The Clitorides are open for voting. [ Dismiss ]
Home ยป Forum ยป Author Hangout

Forum: Author Hangout

How not to format for html with Scrivener

LifeSeeker ๐Ÿšซ

I've been using Scrivener a lot for my most recent story, but it seems like it puts a bunch of junk code in my html files. Also, my block quotation doesn't seem to work out too well when converting.

Are there ways to fix that?

graybyrd ๐Ÿšซ

@LifeSeeker

Scrivener HTML output seems to favor those who want their page to appear identical to the form/layout of the original document. Thus it is heavy with line & paragraph coding to produce an almost PDF-appearing product, which means a huge amount of HTML code content.

There are other ways to take Scrivener output and produce clean, simple HTML, but it requires using outside tools. Go over to the Scrivener forum:

http://www.literatureandlatte.com/forum/

for a very helpful group who will gladly help.

Replies:   LifeSeeker
LifeSeeker ๐Ÿšซ

@graybyrd

Nice. I look into it.

Vincent Berg ๐Ÿšซ

@LifeSeeker

I've noted before how Calibre does something similar with blockquotes. Because so many people use these tools to post to Amazon, they've adopted Amazon's formatting as their defaults. Thus they'll typically format blockquotes so they only display a single space. There's no way to change this behavior in Kindle devices or the Kindle app, but if you convert the blockquote content type commands into simple blockquote, or use style definitions instead, you'll get the indents you're looking for in other devices.

Calibre delivers clean code, but as I noted, it tends to force certain standard formatting which you have to turn off manually using copy/replace commands.

P.S. I haven't actually checked the code produced by Scrivener lately, so I'm assuming they're doing the same thing as Calibre, since the behavior is seen as the new 'standard' in the industry's use of smartphones.

Replies:   graybyrd
graybyrd ๐Ÿšซ

@Vincent Berg

Ummm ... not really. Scrivener has been around for a long time, and its HTML code produced by compiling a draft document to HTML format has always produced an extremely code-intensive document. As I noted earlier, the intent seems to be an attempt to produce an HTML document very close in appearance to the draft document, almost resembling a PDF duplicate.

Has nothing at all to do with Calibre, or posting to Amazon, or Kindle formatting.

To produce minimal, bare-bones HTML from Scrivener, I found it necessary to output to .RTF, then open that in a Mac app such as TextEdit which has a converter to produce basic HTML encoding.

The Lit&Lat forum may have simpler or more elegant suggestions. There be true experts there.

Replies:   Vincent Berg
Vincent Berg ๐Ÿšซ

@graybyrd

Ummm ... not really. Scrivener has been around for a long time, and its HTML code produced by compiling a draft document to HTML format has always produced an extremely code-intensive document.

My comment wasn't concerning cleaning up the code in Scrivener, but was addressing the problem with the indexing. (It was a 'best guess' summation of what they were trying to accomplish.) I was simply stating that I'd had a similar problem in Calibre.

This kind of thing makes me glad I don't use any formatting.

Invid Fan, the problem isn't the formatting that you choose to use, it's the code that the software inserts into your code as your type. Most of us have been doing this for a while have discovered workarounds. Those of us who code in html simply dump the test into html, clean it up and then copy the text back.

Replies:   Invid Fan
Invid Fan ๐Ÿšซ

@Vincent Berg

As I said, my work around is to not use a program that uses any formatting. Well, apart from the end of a paragraph, but it's hard to screw that up.

Replies:   Vincent Berg
Vincent Berg ๐Ÿšซ

@Invid Fan

As I said, my work around is to not use a program that uses any formatting. Well, apart from the end of a paragraph, but it's hard to screw that up.

The point isn't to avoid formatting, but to avoid programs that produce 'dirty' code. As we've pointed out, formatting is best left to word processing programs using Style Definitions (which then get transferred to the print/ebooks).

By the way, I was initially getting confused between Scribner and Sigil. Sigil is an epub/ebook editing program while Scribner is part of the new wave of writing-aids that supposedly guide you through the writing process. In that case, I'd suggest seeing if you can export the story to another format, either text or using an html editor to search and replace the bad code.

Ernest Bywater ๐Ÿšซ

@LifeSeeker

Scrivener is based on a Word Processor style software and as such, like all word processors, it stores all the format code for each paragraph with each paragraph instead of in the headers or a stylesheet. I have similar issue with the code when I save an .odt file as .html. I resolve it by opening the html file in Bluefish and then using the Replace All option to replace the format code with nothing. A few runs through and all the exce3ss code is gone. But you have to make sure you don't remove your heading commands.

Invid Fan ๐Ÿšซ

This kind of thing makes me glad I don't use any formatting.

Back to Top

Close
 

WARNING! ADULT CONTENT...

Storiesonline is for adult entertainment only. By accessing this site you declare that you are of legal age and that you agree with our Terms of Service and Privacy Policy.