Style sheets

I just discovered Scrivener a few days ago. I LOVE the concept and work flow. Wow! For writing plain text and HTML – where I can just copy and paste content into another app and then add style tags – Scrivener rocks! My productivity is way up.

However, most of my projects involve style sheets. At minimum, ALL my non-HTML projects use paragraph styles. Where apps support them, I also use character styles. For each app, I set up a style sheet that uses standard names for standard styles. When I want to export a document into another app, I change it to an RTF, then open it in the target app. With the text already tagged correctly, it only takes 5 seconds to 5 minutes to fix the formatting, regardless of document length. For most of what I do, style sheets are a must-have because they are such HUGE time-savers.

Note that I don’t need style sheets that DISPLAY anything fancy. I just need paragraphs to show up in the target app with paragraph styles of the right NAME so the importing application can restyle them, and I don’t have to apply styles manually.

I’ve read Scrivener’s documentation, and it’s not clear to me whether or how Scrivener supports style sheets. I’m sure that this has been covered before (I searched quite a bit of the archives before posting), so maybe someone could point me at the relevant discussion?

Thanks,
Wilma

Hi Wilma,

I’m glad you like Scrivener so far.

I’m afraid that Scrivener wasn’t really designed with web content in mind, so style sheets are not supported directly. However, Scrivener does support MultiMarkdown, which allows you control over XHTML, so perhaps an MMD user will be able to help you out.

All the best,
Keith

Sorry, I didn’t communicate as clearly as I thought I did. Let’s try again:

I do NOT need or expect style sheets for HTML coding.

I DO need, at minimum, real named paragraph styles that will transfer between applications via RTF for many of my writing projects. Paragraph AND character styles would be even better.

I don’t need Scrivener to be able to DISPLAY the style accurately, though that would be nice. But each paragraph’s named style DOES have to go in the RTF export so that I can use the styles when I get the manuscript into a word processor.

All my existing non-web writing projects are in styled environments. There’s no way I’d port them to a non-styled environment, because it’d be such a hassle to have to manually re-apply styles when I exported them. (One of my projects is now in volume 7. Each volume is 80-135,000 words, with lots of bulleted and numbered lists, etc. Manually re-applying styles would waste DAYS.)

So, does Scrivener support named paragraph styles? (These are the kind used by Word, Papyrus, Mariner Write, FrameMaker, and WriteNow, which can be transferred via RTF.) And if so, how do I access them?

Thanks,
Wilma

Hi, I’m afraid Scrivener doesn’t support this. Scrivener uses the OS X rich text system, including its way of exporting and saving to RTF. Therefore in terms of named styles, Scrivener only supports what TextEdit supports. I’m not 100% sure that RTF supports named styles, though I could be wrong. At any rates, Scrivener only supports what is built-in by Apple in this regard. Sorry. :frowning:
Best,
Keith

RTF does support named styles; I’ve used them for over 10 years to transfer style information between documents.

Well-implemented styles are a huge time-saver for writers, to the point I’m going to move this discussion to the Wish List section.

Thanks for a great program, Keith!

Best,
Wilma

Hi Wilma,

juh just posted this. It looks like it might help. Look at the entire quicktime movie. It becomes clear after ‘compiling’ how effective Scrivener’s export to LaTex is to achieve the ‘style sheet’ outcome you are looking for. Does this allow you to drop the compiled file onto Word? I don’t have an answer - but it is a start.

hasecke.eu/Members/juh/scrivener … o-latex-1/

:slight_smile:

Thanks, Lord Lightning. I was wondering how Scrivener’s lack of styles could convert to LaTex markup, and juh explains that nicely.

So if I arrange my documents as juh suggests…

…and export from Scrivener as LaTeX, using juh’s method…

…and then I run the result through the (La)TeX to RTF conversion tool described at the bottom of this page

…then I might get something that at least vaguely resembles RTF formatted text with style names. I’ll try it.

Wilma

I’m in a similar situation. I’ve been writing and editing books in InDesign to avoid the hassle of getting proper named paragraph and character styles imported without a lot of extraneous formatting. But InDesign imposes a dreadful burden on creativity and flexibility. It’s like using a 18-wheel semi to pick up a carton of milk. Scrivener is like a lively little sports car, nimble to drive and easy to park. It’s infinitely better for writing. The best of all worlds would be to get the two working in harmony.

I’ve talked to people at Apple and Adobe about the need to manage documents with named styles rather than crude formatting until I’m hoarse. Most programmers aren’t writing for publication, so the hassles of the current software pass over their heads. Everyone is doing it a certain way, which happens to be wrong, so no one can see that there might be a better way. Most people in the industry are stuck in the early 1980s with WordStar like rulers and in the early 1990s with Word’s font-focused obsession. (Notice how hard it is to use and adjust named styles in Word.) It’s hard to get them to understand the enormous value of simple tagging. At best, a little light will come on and they’ll say, “Oh, you want XML.” No, I say. I don’t want XML. XML is far too complicated. All I want is a way to unambiguous tag a word as Italic whatever application it is placed in and whatever font is applied. And all I want to do is to tag a paragraph as a quote without specifying indentation or font size. I want the importing application to determine how a document looks, not the exporting application. I want absolutely none of the font type and style information to be passed through, just the text and the named styles. It never seems to register. Programmers sweat blood to let us transfer a complicated look and feel that matters not a whit. It’s kinda sad.

Unfortunately, the internals of OS X are still in the early 1990s. Apple thinks we users want to transfer font names and sizes when we edit and move between documents. Tagging function, as XML and XHTML do, simply hasn’t worked its way into OS X internals. And since Scrivener depends on what OS X supplies, Scrivener doesn’t understand named styles. That’s why Keith has to throw up his hands. He doesn’t have the time to hand code all this.

I understand what your complaint is. Complex documents with all sorts of body text call for some way to tag what each paragraph is when it is written. Body text needs to be seen as such. Inset quotes,which can easily be confused with body text, needs to be marked. Ditto bulleted and numbered list or the really complex formatting of poetry. We know what this formatting is when we’re writing. We don’t want the drudgery of locating and entering it later in another application.

I’m not sure what application you use after what you’ve written leaves Scrivener, but if you’re using InDesign, check out the incredible search and replace functions in CS3. I’ve already created S&Rs that will apply an Italic style to all text inside « » marks, bold to all inside two such marks and bold italic to text inside three. That takes care of 95% of my character styling. I’m planning on developing another set of searches that will apply a named paragraph style to some other easily typed marker at the start of a paragraph. I’m not sure what that’ll be, but might apply a bulleted list style. The default style would be body text, so most paragraphs would not need to be tagged.

All that hinges on the powerful S&R inside InDesign, but your application might have something similar. And working that way has the plus that everything I do in Scrivener remains text except for footnotes, whose RTF output Scrivener handles well enough.

If you absolutely need the tagged text to be in RTF’s named style formatting, you might develop a method of tagging that would allow you to use some powerful GREP-type search and replace tool (that’s what InDesign uses) or perhaps Perl or Python to replace simple tagging in Scrivener with the much more convoluted formatting of RTF. Unfortunately, when I looked into how RTF marks paragraph tags several years ago, I found it rather confusing, but maybe you can make better sense of the documentation at Microsoft.com than I did.

And as Keith notes, you might also find that MultiMarkdown does what you, although its features may be more limited than you and I might want.

Eventually, it just might be possible for someone to develop and application that takes a Scrivener text file with some simple sort of tagging and changes those tags into named styles with these outputs:

  1. RTF’s named styles for Word-like applications. As you point out, just the names not the formatting.

  2. Named styles in a form understood page layout applications such as Quark, InDesign, FrameMaker, and PageMaker. Each of those application has a unique interchange format that allows simple text tagging as well as more complex formatting. And paragraph/character style tagging is often very simple I believe that InDesign will tag paragraphs if you do no more that place the proper header line at the top and start each paragraph with the style name in a form like . What could be simpler than that?

If that was done, an author could write a complex document in Scrievner with the proper tagging and offer it to publishers properly formatted for whatever page layout application they use, typically InDesign or Quark. And he could do it without spending a penny on those pricey applications.

–Michael W. Perry, Seattle, author of Untangling Tolkien

Thanks Wilma,

I bookmarked the link you gave.

esm.psu.edu/mac-tex/tools.html

Excellent!

:slight_smile: :slight_smile:

Hi Michael,

Thanks for all the detailed information. I used to use WriteNow (Classic only) for short documents, and still use FrameMaker for complicated docs that need cross-references and the like. (Also in Classic, since Adobe didn’t bother to port it to OS X, even though there’s a Unix version. Go figure.) FrameMaker’s great for content like my research notes (7 volumes to date, 80,000 to 135,000 words per volume, indexing, cross references galore). It works okay for writing books. I think Scrivener will be far superior once it uses named styles, or if I can use macros to bash it into approximating them.

Once I get all my WriteNow files ported to something else, I plan to get a MacBook and run FrameMaker under Linux. Unless I can find a program with its powerful features to which I can port my FrameMaker files. (Any suggestions?)

Getting Scrivener and styles working together
FrameMaker’s an incredible power tool, but like you say about InDesign (which I haven’t used):

Yes, yes, yes – that’s exactly what I want.

I don’t want to have to think about styles – which I do in Scrivener. I don’t want to have to muck about with them when I export documents, ditto. I just want to apply styles and forget about them, and have them work and keep on working, as in word processors that use named styles competently.

OTOH, I don’t want to have to think about document structure, and separating content into documents that aren’t mutually searchable, and where do I file that little note I just made so I can find it again. Word processors stink at that; Scrivener excels. (Thanks, Keith!)

Styles are still in the stone age
You are right that the current way that most people use styles is clunky in the extreme. Why shouldn’t people use QWERTY keyboards that are designed to slow typing? (I switched to Dvorak when I got my first Mac in 1987.) Why shouldn’t desktop computers lose all unsaved information if the power goes out for even a fraction of a second? It was good enough for grandpa; why even think about doing it differently? And why shouldn’t styles be right where they were when the first WYSIWYG word processors came out in the late 1980’s?

I haven’t talked to Apple about styles yet – I just registered so I can use their Bug Reporter to suggest a styles upgrade as Keith suggested. I’m seriously thinking about doing a YouTube video about how to use named styles for all the people out there who don’t understand them. This might get the point across to designers at Apple and elsewhere. In my experience, it’s difficult for most people to get the idea of styles from merely reading or hearing about them. When they see me do style wizardry live, they are amazed and want one too. (Any interest on collaborating on a video, or critiquing and offering suggestions?)

What Adobe programs don’t use named styles? I’ve only used FrameMaker and their graphics programs.

Encoding style information within Scrivener
I’m not willing to add markup tags to my documents as I type – for me, they’re too distracting when I read. Fortunately, FrameMaker’s search features are sufficient that I could search for all instances of, say, 12 point Monotone Bimbo and apply a named character or paragraph style to them. (FrameMaker + QuicKeys – YES!) Making each Scrivener pseudo-style a different font would make such conversions easy, though ugly to read on-screen. Clunky, but doable.

Scrivener’s styles would be more useful if the pull-down style controls were concatenated so that applying a named “style” would apply font, ruler, and number/bullet settings all at once. It’s clunky to have to change several separate settings to get a paragraph styled the way I want – and then to have to do it again when I want a paragraph somewhere else styled the same way. I’ll set up some macros in QuicKeys, but a real fix would be better. (Are you listening, Apple?)

Could the Web improve word processor style implementation?
I haven’t used XML styles. How do they differ from HTML?

Completely separating named styles from display in exported documents, as you suggest, would indeed simplify things for programmers. An RTF functionality similar to HTML + style sheets would simplify export and import while still preserving style overrides like correctly formatted HTML does.

IMO, HTML styles are better implemented in many regards than any word processor styles I’ve used. For instance, let’s say I set up the following styles:

Indented paragraph
Bulleted list item
Numbered list item

Now let’s say I have a numbered list item that requires a couple of paragraphs of explanation and a bulleted list inside it. These need additional space on the left so it’s clear that they’re internal to the numbered item’s content. In a word processor, I have to set up separate additional styles:

Indented paragraph padded
Bulleted list item padded

Adding additional styles require additional mental overhead. They make the document’s style list longer. They create more stuff to deal with when I export the document to another application. Whereas in HTML I can set up an indent style that adds padding on the left side (for our demo I’ll name it “indent-1”), then do this:

[content goes here]

Voila! And I can apply “indent-1” to anything – subheads, tables, you name it. Simple, simple, simple.

Unfortunately the HTML style interface is anything but simple, nor have I figured out how to make it simple. But I do think that morphing HTML markup from read-only to something that can be used under the hood for word processor input would simplify a lot of stuff for programmers. (They could just use existing HTML display engines, once these were adjusted to allow input.) Doing this would make it easy to implement better named style interfaces, and make it way easier for naive users to port content from document A to document B and arrive with styles intact.

Wilma Keppel
Author of a bunch of articles at ManagingWholes.com and elsewhere, plus a nonfiction book due out in June 2008

Definitely an interesting discussion… Unfortunately I do have to reiterate that Scrivener will only support named styles if Apple add it to the text system. As InklingBooks says, it would be a huge undertaking on my part to hack something like this into the text system as-is. I just don’t want anyone reading this thread to be misled into thinking that something Scrivener is likely to support any time soon…
All the best,
Keith

Good point, Keith.

Since Scrivener isn’t going to support named styles soon, it’s helpful to discuss:

(a) Workarounds,

(b) How to talk Apple into implementing real styles, and

© How we want them implemented.

I’m getting a lot of useful ideas for all three in this discussion.

Once I have some good workarounds, such as QuicKeys shortcuts that can apply a suite of styling changes to a paragraph at one go, I will post them for others to use.

All the best,
Wilma