Our Halloween Writing Contest is coming up soon. Start Writing! [ Dismiss ]
Home ยป Forum ยป Author Hangout

Forum: Author Hangout

More information on creating e-pubs from html code

Ernest Bywater ๐Ÿšซ
Updated:

As I mentioned in other threads I've started creating my e-pubs from html code because they make much smaller files than when you create from the word processor file. In the process I've learnt a few tricks I'll list below after describing my process and past problems.

My Process

I write all of my stories in a word processor program (Libre Office) using paragraph styles of title heading, heading 1, heading 2, heading 5, quotation, quotation2, centered, preformated text, centred, default style. There a re a few others like footers etc I'm leaving out as not relevant for this. I write it as an ODT file.

Once the story is written I also save it as PDF file, and then a 'Save as HTML' option HTML file. I clean up the HTML to save the file as a HTML file for SoL and a HTML file to create the e-pub from. I use the last as my personal website file as well.

Past problems

Very large e-pub files due to being created from the word processing file. After discussions with people more used to using the xhtml used in creating e-pubs I found the program I use to create the e-pubs (Calibre) does the same silly thing as the 'Save as HTML' function of the word processor in that it provides an excessive amount of format code within the file.

In the 'Save as HTML' option the system each paragraph has a hell of a lot of format code with it (all word processors do this). Much of this format code is needed to ensure the finished file displays the way I want it to. Instead of leaving all of the code in the file I create a style sheet and identify each paragraph as the proper style sheet type while I delete all of the format code within each paragraph. This is essentially the HTML version of assigning paragraph styles within the word processor.

As well as using the style sheet to assign paragraph format code I also use it to provide text color codes and alignment codes.

NB: it was moving all of this paragraph code from each paragraph of the file to the style sheet that cut down on the size of the file.

........................

Recent Findings

In the last few weeks I found part of the issue was that the Calibre program assigns style codes for everything in every e-pub split that isn't in the overall style sheet list. A split is where they assign a chapter break, so think of it as each chapter. Thus the e-pub style sheet will create a new additional style sheet for each chapter to list each type of text that isn't in the main style sheet.

After I went to a lot of trouble to ensure that every paragraph style was covered in the main style sheet I was surprised to see Calibre still creating split style sheets. On further examination I found the system would read and use standard HTML code it preferred everything to be in the style sheet and you used span commands for every text style usage other than the standard text style. This way everything was in the main style sheet.

When I added two text style commands to the style sheet and applied them using the < s p a n c l a s s = " xxx" > < / s p a n > commands around the text the system no longer created split style sheets as everything was now in the main style sheet. This further reduced the overall size of the e-pub file.

Thus while the SoL HTML file has < i > < / i > and < b > < / b > the e-pub HTML files now has < s p a n c l a s s = " i t a l i c " > and < s p a n c l a s s = " b o l d " > with < / s p a n > to close them in the same way I use the commands to apply color to the text.

...................

I'm passing this information along to those who feel they may find it to be of use to them in creating their own e-pubs

The lesson to take away from this is to have every type of text format set out in the main style sheet.

typo edit.

Replies:   Keet  Switch Blayde
Keet ๐Ÿšซ

@Ernest Bywater

I still don't understand why word processors don't have an option "Save as HTML with CSS". I would have thought that an open source editor like LibreOffice would have had such an option seeing the industrious open source community out there.
There is an alternative that might work: Use external CSS with LibreOffice
Maybe that makes it a little easier, haven't tried it myself.

Replies:   Vincent Berg
Vincent Berg ๐Ÿšซ

@Keet

I still don't understand why word processors don't have an option "Save as HTML with CSS".

The problem isn't that WORD, LO and OO don't include as "Save with CSS", but that they include SO much utterly useless crap when they create the epub. If they included a "with CSS" option, then the CSS file would also contain the same crap.

Just so you know, the type of crap these files typically contain are specialized Styles that will allow WORD and LB to process and internal settings within the document exactly as they do now (ex: things like dates, common names, foreign languages. In other words, things which don't impact the final document, but only allows WORD to continue showing their meaningless grammar and spell-check suggestions whenever they might display the html file).

Just as it pays to create your own html file by ripping out the crap that these word processors dump in them, it would also pay to write the entire CSS from scratch, using only the definitions you, the author, originally set up in these word documents.

Likewise, although I haven't examined your link about using external CSS with LO, it wouldn't circumvent the issue, as LO would still add it's own crap to your CSS. :(

It's extra effort, but the benefits in smaller files and faster processing speeds with the final product clearly justifies the extra work.

Replies:   Keet
Keet ๐Ÿšซ
Updated:

@Vincent Berg

The problem isn't that WORD, LO and OO don't include as "Save with CSS", but that they include SO much utterly useless crap when they create the epub. If they included a "with CSS" option, then the CSS file would also contain the same crap.

If they included a separate CSS it should be way less unless they dumbly add doubles. Much off the inline css is the same for many paragraphs which should result in a single instance for all of those in a separate css file.

Likewise, although I haven't examined your link about using external CSS with LO, it wouldn't circumvent the issue, as LO would still add it's own crap to your CSS. :(

That's too bad. I would have thought using an external css would automatically drop the inline css. At least that is what seems logical to me.

I wonder if you wouldn't be better of exporting a simple text file and convert that to html.

Edit: did you ever try an editor like LaTeX? There's also LxX that puts a word-processor like interface in front of LaTeX.

Replies:   Vincent Berg
Vincent Berg ๐Ÿšซ

@Keet

If they included a separate CSS it should be way less unless they dumbly add doubles. Much off the inline css is the same for many paragraphs which should result in a single instance for all of those in a separate css file.

No, they wouldn't include any less, instead, you'd have to do literally twice the work of cleaning up the exact same thing twice.

The whole point of creating a CSS is to apply your single document settings (Style Definitions included) to everything stored on a website (on in an epub). Without a way of telling the word processor which components you'd want, it would put everything in, including it's own internal-processing definitions.

I would have thought using an external css would automatically drop the inline css. At least that is what seems logical to me.

It doesn't reduce the contents of any single document, it prevents each document from repeating the exact same commands (just like, in Ernest's case, Calibre adds the exact same commands to each Calibre 'chapter' (which can vary widely in size from one book to another)).

Plus, WORD dumps all that crap into files because few authors have a clue how to create or edit an html file (as Ernest never wanted to be bothered doing before), and even among html coders, but add more to a CSS than than a few stray commands. Thus it's a LOT of work that no one would ever know enough to use. It's a losing proposition for everyone involved. :(

Switch Blayde ๐Ÿšซ

@Ernest Bywater

The problem I see with what you're doing is that your master copy of your novel is now in the modified XHTML/CSS rather than in LibreOffice. So any time you want to make a change, even fixing a typo, you can't do it in LibreOffice.

Replies:   Keet  Vincent Berg
Keet ๐Ÿšซ

@Switch Blayde

So any time you want to make a change, even fixing a typo, you can't do it in LibreOffice.

Fixing a typo could be done in the xhtml, a full rewrite though...

Replies:   Switch Blayde
Switch Blayde ๐Ÿšซ
Updated:

@Keet

Fixing a typo could be done in the xhtml, a full rewrite though...

I converted my Word doc to XHTML/CSS by hand for my first novel. I did make a typo change in the HTML later. I don't remember if I went back and made the same change in the Word doc (right now I don't trust the Word version to be as current as the HTML one). The point is, the XHTML/CSS file is now the master. As you said, if I want to make a change more than a typo, forget it.

I'll live with the extra code Calibre creates. Calibre also automatically creates the Table of Contents if you define your chapters as Heading 1. I remember doing that manually wasn't so easy.

Replies:   Vincent Berg
Vincent Berg ๐Ÿšซ

@Switch Blayde

I don't remember if I went back and made the same change in the Word doc (right now I don't trust the Word version to be as current as the HTML one.

That's why I use so many duplicate files, so I won't forget what I've updated and what I haven't, since I update everything. But again, I don't repeat the process every time. I already limit what WORD dumps into the html files, I then circumvent their extensive definitions by using my pre-defined html Style Defs (normally a simple cut & paste, except I now cut and paste the entire text in one go, rather than adjust each html section separately.

It's all about working smarter, not harder. If I went through the amount of work you're assuming, I'd never do the work for any file, rather than doing it for EVERY file as I do now.

But, I've also been doing this for a hell-of-a-long time, studying other's websites to see what they include, and how they work around problematic issues. So now the entire process is like a well-oiled machine. It doesn't take much maintenance.

Switch Blayde ๐Ÿšซ

@Vincent Berg

I already limit what WORD dumps into the html files

When I did it manually, I did it MANUALLY. I didn't do a "save as HTML" and then clean it up. I searched for italicized words and bracketed them with the . And I wrote the HTML/CSS from scratch. And, as I said, the Table of Contents wasn't easy to create.

At the time, I thought about creating a website and needed to do it for that. But I have no interest in doing that anymore.

Switch Blayde ๐Ÿšซ

@Vincent Berg

I already limit what WORD dumps into the html files

When I did it manually, I did it MANUALLY. I didn't do a "save as HTML" and then clean it up. I searched for italicized words and bracketed them with the . And I wrote the HTML/CSS from scratch. And, as I said, the Table of Contents wasn't easy to create.

At the time, I thought about creating a website and needed to do it for that. But I have no interest in doing that anymore.

Replies:   Keet
Keet ๐Ÿšซ

@Switch Blayde

If you do it twice it's always more work ;)

Vincent Berg ๐Ÿšซ

@Switch Blayde

The problem I see with what you're doing is that your master copy of your novel is now in the modified XHTML/CSS rather than in LibreOffice. So any time you want to make a change, even fixing a typo, you can't do it in LibreOffice.

I do this not only with each of my books, and for each chapter of every book, but I update it (duplicating the process) for each chapter update. Once you've done it a few times, it becomes fairly automatic, as you inherently know what to look for.

The CSS additions take my approach a step further, as I was simply copying my WORD definitions from one html file to another. Ernest is taking it a step further, replacing all his definitions with a single CSS file for either his entire website, or his entire epub.

It does take a little more time, but the benefits of routinely 'cleaning house' makes the routine beneficial. I now routinely delete any internal WORD Style Definitions from my documents, so I don't have to worry about it being inserted into my documents, and most of the crap it dumps into your html files can easily be eliminated by clicking a few settings within WORD. Again, it's worth cleaning house just so you'll know what it's doing to your files, so you can cut it off at the sources.

Keet ๐Ÿšซ

Have any of you authors ever tried Scrivener, yWriter, Grammarly? It just seems to me that there are way better tools for writing then a standard word processor like MS Word or LibreOffice.

Vincent Berg ๐Ÿšซ

@Keet

Have any of you authors ever tried Scrivener, yWriter, Grammarly? It just seems to me that there are way better tools for writing then a standard word processor like MS Word or LibreOffice.

First of all, Grammarly is an advanced spell-checker, not a way to write stories. Similarly, Scrivener is a content formulation tool, so it doesn't help your write, it merely allows you to spread your ideas out on a large virtual wall so you can waste hours decided what to write.

But you have the same thing with the newer writing apps, in that they're all geared towards 'distraction free writing', meaning they offer little formatting options, assuming everyone is too stupid to understand what they're doing. Thus they're essentially for those of us who already know how to write and use the various tools, instead they're geared towards those who'll likely never get very far (simply because they'll never put in the time learning how to properly format things.

I've tried most of those tools, and haven't been satisfied with any. I'm also unhappy with the older word processors, but at least many of us learned how to use them after spending years in the business world, so it didn't take much time to become familiar with a new tool. Sadly, no one is even trying to create new Word Processors! The few that even take a stab at it (i.e. iBooks Author, or Kindle's new Kindle Create) have been dismal failures (they routinely are overly specialized, with too few features for most established authors).

If you search through the older threads, you'll notice we've debated each tool multiple times over the years, so year, we're all aware of them.

Replies:   Keet
Keet ๐Ÿšซ

@Vincent Berg

First of all, Grammarly is an advanced spell-checker, not a way to write stories. Similarly, Scrivener is a content formulation tool, so it doesn't help your write, it merely allows you to spread your ideas out on a large virtual wall so you can waste hours decided what to write.

I know what these tools do, as I mentioned them as 'tools', not as replacement word processors. I just wondered if anyone uses them.

Ross at Play ๐Ÿšซ

@Keet

I just wondered if anyone uses them.

I have more faith in Grammarly's free online grammar checker than the one Word has.

Experience with some tools similar to Grammarly's entire package suggests to me it's directed too heavily to the needs of technical writers and produces so many false positives for authors of fiction it's a waste of time.

Replies:   Vincent Berg
Vincent Berg ๐Ÿšซ

@Ross at Play

Experience with some tools similar to Grammarly's entire package suggests to me it's directed too heavily to the needs of technical writers and produces so many false positives for authors of fiction it's a waste of time.

I agree with your summation, plus most grammar (vs. spell checkers) tend to tell you "this use isn't valid" when it fact it's perfectly valid in fiction, but not in business report writing! :( The very first thing I do with any spell checker it to completely disable the grammar checker because of this. But in Grammarly, you can't. :(

Vincent Berg ๐Ÿšซ

@Keet

I know what these tools do, as I mentioned them as 'tools', not as replacement word processors. I just wondered if anyone uses them.

Ah, that wasn't clear in my reading. As I said, I've tried each, except for yWriter, but as I said, Grammarly kept reporting too many false positives, so I spent more time checking out sentences/words with nothing wrong with them, cutting way down on my overall productivity (i.e. it didn't save me any time proofing my own work). Scrivener, as I said, is a 'storyboarding' tool, and since I don't need help constructing stories, it didn't seem helpful.

The ONE tool I do use heavily, though, is AutoCrit. They only allow you to test little segments, and they charge quite a bit, but I got involved with it early, when they were still trying to generate funds, so they offered me a fairly cheap lifetime membership. But it reports the types of things I can't get anywhere, and the things my editors don't even pick up on. But like all tools, you've got to learn which advice an options to ignore, and which few to focus on. But I now live and breathe by it, at least during my final revision phase (after the first draft but before I submit my stories to my editors).

Replies:   Keet
Keet ๐Ÿšซ

@Vincent Berg

The ONE tool I do use heavily, though, is AutoCrit.

Never heard of it but then I'm not an author so I'm not supposed to, right ;)
It looks like an interesting tool but indeed expensive. I would love to see how they defined the analyzing algorithms. (professional interest)

Replies:   Vincent Berg
Vincent Berg ๐Ÿšซ

@Keet

Never heard of it but then I'm not an author so I'm not supposed to, right ;)
It looks like an interesting tool but indeed expensive. I would love to see how they defined the analyzing algorithms. (professional interest)

The problem, is that they don't filter the results at all, so some of their reports of full of false positives, while some are less so. But, for certain reports, which you learn to trust, it's worth the false positives for the insights it gives into your own writing process.

Sadly, many of the better reports are only available via their subscription model (i.e. you won't even see them with their 'sample' edits). :(

Once again, since I got in early, they often give me beta copies of new releases, so I can help fine-tune what the finished product, though they're still primarily a business tool, rather than a fiction writer's one.

By the way, I NEVER expected to see this level of interest in a thread about creating customized CSS specifically for epubs. I'm impressed there are this many users/authors curious about the process.

Ernest Bywater ๐Ÿšซ

@Keet

Scrivener, yWriter, Grammarly?

I found them totally useless and much harder to use than Libre Office because I care about the formatting and display of my stories. yWriter just didn't give me the easy text formatting capability I have in Libre Office.

Michael Loucks ๐Ÿšซ

@Keet

Have any of you authors ever tried Scrivener, yWriter, Grammarly? It just seems to me that there are way better tools for writing then a standard word processor like MS Word or LibreOffice.

I use Scrivener, but probably not the way LitertureAndLatte intended. I write everything in plain text (on my Mac using BBEdit from Bare Bones Software), then run a bash script to create chapters and sections (folders and files) to import into Scrivener. I then change the SOL markup (the underscores and asterisks) to italics and bold manually. I then compile to docx, epub, mobi, and pdf.

Scrivener can be VERY confusing, though they've improved it with v3. Once you're happy with your layout, though, then it's really simple to use the same template for any book.

Replies:   Keet  Vincent Berg
Keet ๐Ÿšซ

@Michael Loucks

I like your way of working. You have every step under control and use different tools to do what they do best. It's what I do converting downloaded stories to my own library. I use a mix of bash scripts, c# code (monodevelop), a file manager, gedit text editor, firefox, and bluefish html editor.

Vincent Berg ๐Ÿšซ

@Michael Loucks

Scrivener can be VERY confusing, though they've improved it with v3. Once you're happy with your layout, though, then it's really simple to use the same template for any book.

In my case, once I figure out the correct formatting for each outlet (i.e. Amazon, lulu, SW and/or D2D) I reuse the file for each new story, and as I continually update and refine the formatting over time, I go back and update the older ones (though that's a much lessor priority!) There's no sense reinventing the wheel each time you time you change a tire. 'D

Ernest Bywater ๐Ÿšซ

I'll try to answer a few of the other posts in one go here.

1. After I have a complete html file with style sheet if I need to make typo correction to the file it's easier to do that change in the html file than anywhere else. If I have to make a large amount of changes, such as a review & revision process I do it to the ODT master file then I reconvert the file.

2. The conversion from the 'save as html' file full of crap to the finished html file with the style sheet is very easy, but it takes a lot of work. Most of the work is done using the 'Replace All' in the text editing program to replace unwanted code with nothing to clear it out. Then I'm left with what's the basic real and useful code. Most of what I delete is the font type designation, the margin settings, and page break codes.

Because I started with a word processing document using paragraph styles the paragraphs using those styles have the appropriate html code for them. Thus the Chapter headings in Heading 1 style have the html < h 1 > code beside, the same is true for the < h 2 > sub-chapter headings and the < h 5 > section headings with the proper html code for the other paragraph styles like the blockquotes H6 headings, quotations, centred text, plus the general use < p > for the default text. Within paragraphs the bold and italics commands of < b > and < i > are used along with the font color commands. Again I use the global replace all to convert from the existing html commands to the ones from the style sheet.

Thus < h 1 > becomes < h 1 c l a s s = " h e a d 1 " > and so on down the line, to where I have < s p a n c l a s s = " b o l d " > within the paragraph text to bold a section of text before I close it with the < / s p a n > command.

If I left the standard html commands in place Calibre would create a split style sheet for every chapter and assign a new style name for each html code eased in that chapter. By placing it in the main style sheet and using the style sheet span command it defers to the main style sheet and there's no need for a split style sheet.

3. I use the same style sheet for each of my web pages so they're uniform, and that way the same file will do for the e-pub and the website and I don't need a style sheet for the website itself.

Replies:   Keet  Vincent Berg
Keet ๐Ÿšซ
Updated:

@Ernest Bywater

Most of the work is done using the 'Replace All' in the text editing program to replace unwanted code with nothing to clear it out.

You should investigate scripting for the OS you are using. I know on Linux you could create a bash file with multiple lines using 'sed' to replace text strings. I assume most re-occur in following books so you just have to run the script again to do most of the replacements. You can leave non-occuring replacements in the script, if they are not found nothing is replaced. Over time when you add more replacements the script becomes better and better by replacing almost all that needs replacing.

I'm sure that the same tools exist for windows and mac.

Ernest Bywater ๐Ÿšซ

@Keet

You should investigate scripting for the OS you are using.

The big problem with that it'll likely make serious cuts into my story writing time.

Replies:   Keet
Keet ๐Ÿšซ

@Ernest Bywater

The big problem with that it'll likely make serious cuts into my story writing time.

I bet it will save time, at least in the long run since the script will replace everything you are now replacing by hand. If you're on Linux I can create an example for you so you just have to enter the strings just once. If you're on something else I can't help you, I have never used IOS/OSX an haven't used windows in almost 10 years.

Replies:   Ernest Bywater
Ernest Bywater ๐Ÿšซ

@Keet

I bet it will save time, at least in the long run since the script will replace everything you are now replacing by hand.

I use Libre Office on Zorin Linux. My concern is if I get into learning enough to do the coding properly I'll probably get too involved in coding to write for a long while. At the moment I use the 'Replace all' function in the text editor to remove or replace what needs to be dealt with. Thus one action for each item I need to remove or change.

However, if you wish to code something for me to try I'll be happy to test it for you. For it to be less effort I'd need to end up with a script where I can list the various items to be replaced and what they should be replaced with so i can have everything in the one saved script and it runs to replace all of the common items. I'm not exactly sure how I'd go about that with the proper commands like grep etc.

Vincent Berg ๐Ÿšซ

@Keet

You should investigate scripting for the OS you are using. I know on Linux you could create a bash file with multiple lines using 'sed' to replace text strings. I assume most re-occur in following books so you just have to run the script again to do most of the replacements. You can leave non-occuring replacements in the script, if they are not found nothing is replaced. Over time when you add more replacements the script becomes better and better by replacing almost all that needs replacing.

For me, you've got to be careful about global replacements, especially in the Word Processor to html cleanup, as there are often valid uses uses for certain coding (ex: < span class=""> statements, or even more obnoxious, the associated but separate "< /span>" commands). Thus you need to verify each replace/deletion. That's what takes the most time.

Replies:   Keet
Keet ๐Ÿšซ
Updated:

@Vincent Berg

For me, you've got to be careful about global replacements, especially in the Word Processor to html cleanup, as there are often valid uses uses for certain coding (ex: < span class=""> statements, or even more obnoxious, the associated but separate "< /span>" commands). Thus you need to verify each replace/deletion. That's what takes the most time.

I agree. It's the kind of problem I meet almost daily since file conversions is one of the things I do professionally. I'm sure it's sometimes easier to start with a clean text file and add the tags. Replace multiple line breaks with /p + 2 line breaks + p tag and you have most done. Add header and footer tags and in most cases the first p tag and you have a working html file created from a text file. Add in the h tags where you want and it's done. If you had place markers in your text file you could use those for replacement of h tags and you could automate the whole thing.

Replies:   Vincent Berg
Vincent Berg ๐Ÿšซ

@Keet

It's the kind of problem I meet almost daily since file conversions is one of the things I do professionally. I'm sure it's sometimes easier to start with a clean text file and add the tags. Replace multiple line breaks with /p + 2 line breaks + p tag and you have most done.

I too once worked with professional text conversion programs (the ones we once used have NEVER been duplicated since, so I'm wondering who dropped the ball in that field since the original company has been long out of business), but it's a little more complicated in the Word Processor html conversion cleanup.

The vast majority of the text is perfectly fine, especially since they each contain your style definitions. The problem is when, for some odd reason, they suddenly start adding in nonsense junk (like a misplace italic suddenly produces a full 3 lines of extra junk attached in multiple locations in each each paragraph thereafter. So it's not a cut and dried substitution process. Most times it's a simple process, but when it goes wrong, it often goes VERY wrong! Thus it's always safer to watch each replace operation to ensure you didn't screw up.

Our (us old-timer business word processor hacks) issue with the newer 'Distraction Free' apps is that they completely abandon the concept of defined Styles, thus you only get ONE KIND of paragraph, and each italic or bold is a stand-alone edit. That's akin to throwing the baby out with the bath water each time. Thus despite their many faults, we'll continue wrestling with their imperfections, because working from consistently implemented Style Defs ultimately saves us a LOT more work than 'never having to learn' about them does.

But then, we're the old dinosaurs, so I don't we'll change any of the younger, non-business trained author's minds.

Replies:   Keet
Keet ๐Ÿšซ

@Vincent Berg

I too once worked with professional text conversion programs (the ones we once used have NEVER been duplicated since

I don't work with conversion programs, I designed and build a framework with which I can create custom conversions for clients with build in auditing, reporting, monitoring etc. It's a service that runs on my own servers, not a program they can buy. That's why I am very familiar with all types of conversions, I build them custom for each client (multiple for some). Too bad every author produces exported html that is different for each author otherwise I could build a conversion for everyone.

Ernest Bywater ๐Ÿšซ

@Keet

Too bad every author produces exported html that is different for each author otherwise I could build a conversion for everyone.

Or do some cat herding by trying to convince us to use what you created.

The html code I use for SoL is a lot more basic than what i use for the e-pub. However, now I have that sed converter working I know how to do one for the SoL conversion .

Replies:   Keet  Vincent Berg
Keet ๐Ÿšซ

@Ernest Bywater

Or do some cat herding by trying to convince us to use what you created.

It would require multiple files from different authors just to determine if it's possible to create a conversion for everyone. I doubt authors are willing to change the way they work just to be able to use such a conversion.

However, now I have that sed converter working I know how to do one for the SoL conversion .

Good to hear you have it working! That might be a workable solution for more authors even if just for the first bulk of replacements. It allows them to each choose their own items to replace or remove.

Replies:   Vincent Berg
Vincent Berg ๐Ÿšซ

@Keet

It would require multiple files from different authors just to determine if it's possible to create a conversion for everyone. I doubt authors are willing to change the way they work just to be able to use such a conversion.

Maybe not, but once you have one, I'm sure there are plenty of author's who'd be eager to try it out. As we've said, most of us have tried a wide variety of tools, each of which finding different ones useful while others find them merely distracting. But each of those tools seems to have found a useful niche, and their developers definitely aren't starving!

Replies:   Keet
Keet ๐Ÿšซ

@Vincent Berg

Maybe not, but once you have one, I'm sure there are plenty of author's who'd be eager to try it out. As we've said, most of us have tried a wide variety of tools, each of which finding different ones useful while others find them merely distracting. But each of those tools seems to have found a useful niche, and their developers definitely aren't starving!

Ernest tried it and I believe he send you a copy of the script. It looks like it works for him so I'm sure others who work the same way can adapt the script to their own needs. And yes, you must be careful and test before you use it for all your files.
By the way: to convert the script for use on windows powershell use the get-content command to replace sed. Look it up for specifics, I stay far away from windows.

Ernest Bywater ๐Ÿšซ

@Keet

I stay far away from windows.

so you should, snipers can shoot through them. lol.

The approach I ended up taking with the sed script file was to list each format code option I wanted removed or replaced. It is a little longer than I hoped, but it even covers code mixes in the old files that don't appear in the new files. The only thing I didn't cover is ordered and unordered lists because I don't use them.

Replies:   Vincent Berg
Vincent Berg ๐Ÿšซ

@Ernest Bywater

The only thing I didn't cover is ordered and unordered lists because I don't use them.

I use them, but not often, and mostly for a book's front and back matter (ex: Acknowledgments, Contributors and my Contact lists) though I've also used them with indented text when some reads a sign or other else listing conditions. Against, fairly specialized exceptions.

Vincent Berg ๐Ÿšซ

@Keet

I stay far away from windows.

A very wise choice, but I'm put off by the limited offerings on Linux (though Macs have even less dedicated programs). I'm only sticking with an old version of Windows 7 (the last version I felt I could trust, because I've been waiting for my desktop to die before replacing it with a $3,000+ replacement, and it absolutely refuses to give up the ghost (though my HD continue failing with consistency on a regular basis). Note: It was a custom-build system, and not a typical packaged computer from a name-brand company.

Replies:   Keet
Keet ๐Ÿšซ

@Vincent Berg

A very wise choice, but I'm put off by the limited offerings on Linux (though Macs have even less dedicated programs). I'm only sticking with an old version of Windows 7 (the last version I felt I could trust, because I've been waiting for my desktop to die before replacing it with a $3,000+ replacement, and it absolutely refuses to give up the ghost (though my HD continue failing with consistency on a regular basis). Note: It was a custom-build system, and not a typical packaged computer from a name-brand company.

Limited offerings? Do you have any idea how many programs are available through the repositories only? And then you can still download and install packages not in the repositories. You won't find many programs that 'do it all' because that goes against the Linux philosophy of 'do one thing and do it well'. A complex program under Linux usually is a set of small executables that are called from the main program and a lot of those smaller executables are default to Linux which makes it very efficient and reliable.

You better change your HD fast, should be easy in a custom build system.

Vincent Berg ๐Ÿšซ

@Ernest Bywater

The html code I use for SoL is a lot more basic than what i use for the e-pub. However, now I have that sed converter working I know how to do one for the SoL conversion.

If you have a working cleanup routine your satisfied, send me a copy. Since I'm on Windows and Mac, I can't use a sed converter, but if I'm satisfied that it won't accidentally delete something needed, I'll gladly figure out out of my own.

I was just explaining why we were nervous about building one ourselves.

Vincent Berg ๐Ÿšซ

@Keet

Too bad every author produces exported html that is different for each author otherwise I could build a conversion for everyone.

Ernest and I, at least, are essentially doing the same thing, though we came at it from two different directions. But occasionally we compare notes and suggest how different ways to code the Styles Defs and CSS files to refine our approaches.

Again, the big problem is not accidentally deleting something you need. I mentioned the < /span> command in reference to Ernest's comments about using it, but honestly, I've never used a span html command in my stories (although I add them in my epubs since Apple requires it for centered text, for some unknown reason.

When I mentioned how the WP programs often tack on the excessive code onto each paragraph, often is several discreet pieces, it also often 'takes over' simple < i> coding, adding in junk so that, if you did remove it, you might also strip out all the in-line formatting (i.e. the formatting not controlled by your Style Definitions.

But I was laying out the problems, if you want to try it, Ernest and I can provide you with plenty of examples of the crap which both WORD and LO dumps into html files. We've just been cautious about trying to implement it ourselves. But it's easy enough to compare pre and post html cleanup routines look, and quickly determine whether they're the same or not.

It's just been a LONG time since either of us have actively coded ourselves.

Switch Blayde ๐Ÿšซ

@Vincent Berg

a span html command in my stories (although I add them in my epubs since Apple requires it for centered text, for some unknown reason.

When I hand coded the HTML for my first novel, converting from Word, I used a guide I found on the internet. It said e-books required the "span" for centering. So I don't think it's an Apple thing.

Vincent Berg ๐Ÿšซ

@Switch Blayde

When I hand coded the HTML for my first novel, converting from Word, I used a guide I found on the internet. It said e-books required the "span" for centering. So I don't think it's an Apple thing.

It's only "required" for ebooks, because Apple won't center anything unless it includes the < span> command. The other 3rd party distributors just insert the necessary command for you, rather you having to code it yourself. But no one else insists on using a < span> command for anything, it's just one of those odd Apple demands that everyone else caters to (just like they do with Amazon's 'all indents are only a single space left-indent').

For a long time Ernest and I argued incessantly about whether Lulu 'required' an odd capitalization rule for chapter titles, but in the end, as long as it didn't involve the Lulu book going through Apple, it was fine, so in essence, it was an Apple restriction designed to penalize Lulu's authors.

Ernest Bywater ๐Ÿšซ

@Switch Blayde

It said e-books required the "span" for centering

I center the paragraphs as part of the paragraph style definition and not as a separate span command. because the centering doesn't turn up in the middle of a paragraph while the bold and italics do, thus they need a span command at that point.

Replies:   Vincent Berg
Vincent Berg ๐Ÿšซ

@Ernest Bywater

I center the paragraphs as part of the paragraph style definition and not as a separate span command. because the centering doesn't turn up in the middle of a paragraph while the bold and italics do, thus they need a span command at that point.

There's never been a problem with centering text in a document, but Apple (and D2D too), for whatever reason, simply won't allow centered graphics unless it's accompanied by the odd-ball < span class="Centered"> command. If you include an image in an "align=center" paragraph, it defaults to left-justified, regardless of where it occurs.

When you deal with images on a regular basis, you learn the work-arounds quickly.

Switch Blayde ๐Ÿšซ

@Vincent Berg

I've never used a span html command in my stories (although I add them in my epubs since Apple requires it for centered text, for some unknown reason.

This is from the guide on converting Word to XHTML/CSS

Centering text in eBooks is one of the most error prone undertakings because device manufacturers seem to have different takes on what "centering" means. Sounds ridiculous, I know, but I am not lying to you.

To create foolproof centering we have to double-stitch our approach, to make sure every device understands exactly what it is we're trying to do.

First we will include the following two styles in our file.

p.centered
{
text-indent: 0em;
text-align: center;
}
span.centered
{
text-indent: 0em;
text-align: center;
}

Since both declarations look identical, this might seem redundant, but sadly, some devices, like the iPad, require the < span > tag for centered elements, while others require the more commonly used < p > tag. I think it is also important to point out that the text-indent: 0em; setting is important in this context. Without it, the device would actually render our text slightly off-center because it would center the text and then add a 1.5em indentation to it. Not what we want, so we have to reset the indentation to zero.

To center our text line, we will now wrap it with the proper HTML tags and make it look like this.

< p class="centered" >< span class="centered" >***< /span >< /p >

This may not look nice in code form, but it solves all our problems and the line will now be centered correctly on all devices I have come across.

Vincent Berg ๐Ÿšซ

@Ernest Bywater

Thus < h 1 > becomes < h 1 c l a s s = " h e a d 1 " > and so on down the line, to where I have < s p a n c l a s s = " b o l d " > within the paragraph text to bold a section of text before I close it with the < / s p a n > command.

I do the same with simple corrections. If I have fewer than three corrections, I'll make them directly to the html and the original chapter document, but if I have to make larger changes, I'll repeat the entire "save as enhanced html..." process.

As for your "spanclass="bold", assuming you're submitting your html files to SOL, how does SOL handle the spanclass command? I'd think they'd automatically delete it, since it's not standard html.

Replies:   Keet
Keet ๐Ÿšซ
Updated:

@Vincent Berg

As for your "spanclass="bold", assuming you're submitting your html files to SOL, how does SOL handle the spanclass command? I'd think they'd automatically delete it, since it's not standard html.

I assume he means ''. That is valid html assuming the class bold is defined in css.

edit: ok, that was automatically removed ;)
What I meant was a space between span and class.

Replies:   Vincent Berg
Vincent Berg ๐Ÿšซ

@Keet

What I meant was a space between span and class.

Since SOL assumes that ANY open bracket contains an html or SOL command, it tosses any it isn't set up to handle, so it's become common practice to include a space after the first left-bracket symbol (ex: '< spanclass="bold">').

awnlee jawking ๐Ÿšซ

I wonder if you wouldn't be better of exporting a simple text file and convert that to html.

I was over halfway through writing a science fiction novel when I left off to write 'Gay!'. I mentioned the subject matter to an acquaintance and they were extremely keen to be a beta reader once I finished it (which won't happen until 'Gay!' is complete). What's the simplest way for a dummy like me to convert a plain text file into something an e-reader can understand?

AJ

joyR ๐Ÿšซ

@awnlee jawking

What's the simplest way for a dummy like me to convert a plain text file into something an e-reader can understand?

If you have a mac, open the txt file in pages, select export as epub. You're done.

Replies:   awnlee jawking
awnlee jawking ๐Ÿšซ

@joyR

If you have a mac

I do indeed have a raincoat, but my computer runs Windows XP - I need it for some specialist software I depend upon for my research :(

AJ

Switch Blayde ๐Ÿšซ

@awnlee jawking

What's the simplest way for a dummy like me to convert a plain text file into something an e-reader can understand?

Calibre is free and runs on Windows.

https://manual.calibre-ebook.com/faq.html

What formats does calibre support conversion to/from?

calibre supports the conversion of many input formats to many output formats. It can convert every input format in the following list, to every output format.

Input Formats: AZW, AZW3, AZW4, CBZ, CBR, CBC, CHM, DJVU, DOCX, EPUB, FB2, FBZ, HTML, HTMLZ, LIT, LRF, MOBI, ODT, PDF, PRC, PDB, PML, RB, RTF, SNB, TCR, TXT, TXTZ

Output Formats: AZW3, EPUB, DOCX, FB2, HTMLZ, OEB, LIT, LRF, MOBI, PDB, PMLZ, RB, PDF, RTF, SNB, TCR, TXT, TXTZ, ZIP

awnlee jawking ๐Ÿšซ

@Switch Blayde

Thanks. That looks as though it will do the trick.

AJ

awnlee jawking ๐Ÿšซ

@Switch Blayde

I have a follow-up question. Does Calibre preview what the converted document will look like on an e-reader, or will I have to press-gang a friend into looking at it for me? I'm keen not to send the acquaintance a file of garbage.

AJ

Ernest Bywater ๐Ÿšซ

@awnlee jawking

Does Calibre preview what the converted document will look like on an e-reader

The Calibre software includes an e-book view. Once you create the e-pub if you double click on the title in the Calibre libry it will open the e-book viewer so you can view the e-pub. Also, if you click on an e-pub file the e-book viewer will also open up, unless you have another program set to be the default for that file type.

Calibre was originally designed as an e-book library management program, so an e-reader is a key part of it.

I also downloaded a couple of other free e-book readers so I cans ee what the file looks like in different readers. And they do show differently in different readers.

Replies:   awnlee jawking
awnlee jawking ๐Ÿšซ

@Ernest Bywater

Thank you, that's a great help.

AJ

joyR ๐Ÿšซ

@awnlee jawking

Have you considered using google docs? You could share the doc with your friend and he/she could annotate it if that's part of the plan.

Just a thought

Ernest Bywater ๐Ÿšซ

@joyR

You could share the doc with your friend and he/she could annotate it if that's part of the plan.

Safer to do that by using DropBox. There's evidence Google mines what goes through Google Docs.

joyR ๐Ÿšซ
Updated:

@Ernest Bywater

There's evidence Google mines what goes through Google Docs.

I'd be shocked if they didn't.

Not that I condone such things, but I do accept that where there are people able to see other people's documents, it is going to happen. The only questions are how official that access is, and what if anything is done with it.

For a simple story what does it really matter? The author has proof of upload and file creation that would predate and google obtained file. So unless you are writing the sequel to the latest blockbuster or plans to overthrow government, does it really matter?

I value my privacy, but I also accept that since cavemen sat talking around a fire, someone took the opportunity to eavesdrop.

Keet ๐Ÿšซ

@joyR

Not that I condone such things, but I do accept that where there are people able to see other people's documents, it is going to happen. The only questions are how official that access is, and what if anything is done with it.

The problem is not that they see the contents of a single email or document, the problem is that they see everything you do on google docs and use it to build a profile combined with different other sources they get from you (search data, a lot of tracking data). I suspect that they are very close to point out a single person with a specific profile.

Replies:   joyR
joyR ๐Ÿšซ

@Keet

I suspect that they are very close to point out a single person with a specific profile.

Easily done now, social media, dating sites, actually this site, has your email address, knows how often you log in, which stories you view, how you vote, lots of stuff to build a profile, question is to what purpose?

Whilst I don't subscribe to the 'nothing to hide, nothing to worry about', chain of thought, profiling has been around a long time and isn't going away.

Those who protest it's existence would be better served pushing for better accountability.

The 'they' you refer to are not people but algorithms, relatively few people actually get to see your individual data, unless you happen to be on the most wanted list. Fact is Facebook now has 7,500 content moderators working around the globe 24 hours a day. Misleading in itself because those 7,500 people eat, sleep, have days off. Still they barely keep pace deleting things that are uploaded by users but shouldn't be.

Who exactly has the time of inclination to access 'your' data? Why? And who pays them? Answer is nobody. Because there is no profit in it.

An algorithm can handle thousands in a given amount off time and sell the 'targets' to advertisers etc. THAT generates profit.

Replies:   Vincent Berg
Vincent Berg ๐Ÿšซ

@joyR

Those who protest it's existence would be better served pushing for better accountability.

I agree with your reasoning (about not wasting time worrying about the inevitable) but there are established safe alternatives, both for cloud storage (DB) and for email (they vary, but MS's default Explorer (?) is the absolute WORST!!!

Replies:   joyR
joyR ๐Ÿšซ

@Vincent Berg

there are established safe alternatives, both for cloud storage (DB) and for email (they vary, but MS's default Explorer (?) is the absolute WORST!!!

Agreed.

My original suggestion was limited to the potential for one person to share a text file with another easily. Nothing more.

Definitely NOT for storage purposes.

Ernest Bywater ๐Ÿšซ

@joyR

I value my privacy, but I also accept that since cavemen sat talking around a fire, someone took the opportunity to eavesdrop.

I doubt if Google will try to beat you to publish, but they can use it for anything - they've already used the mined data from their products to target marketing, and to target people due to the political associations shown in the mined material - not sure where it will end.

Vincent Berg ๐Ÿšซ

@joyR

For a simple story what does it really matter? The author has proof of upload and file creation that would predate and google obtained file. So unless you are writing the sequel to the latest blockbuster or plans to overthrow government, does it really matter?

Google doesn't sell the contents to advertisers, instead they sell "keyword access", so if a fictional character likes guns you'll automatically receive mail from the NRA. If a fictional character suffers from ED, you'll get inundated with Viagra ads, and as I intimated, if you're investigating story locations, you'll be buried under 'discount rates' for your next visit to someplace you've never been, and will likely never visit!

Replies:   joyR
joyR ๐Ÿšซ

@Vincent Berg

you'll automatically receive mail

Very true, however you could do as I do, set a 'burn' email address that deletes all incoming mail. Handy for sites like google et al.

Replies:   Vincent Berg
Vincent Berg ๐Ÿšซ

@joyR

Very true, however you could do as I do, set a 'burn' email address that deletes all incoming mail. Handy for sites like google et al.

That's an option I haven't tried yet, although I have a range of different emails for different purposes, though my email program is pretty good about weeding out the junk (I no longer see any Viagra or "Meet singles in your area" ads).

Vincent Berg ๐Ÿšซ

@Ernest Bywater

Safer to do that by using DropBox. There's evidence Google mines what goes through Google Docs.

Yeah, that too. Every time I'd research locations for a new book, I'd get a string of ads from various car rental and hotels offering cheap fares on my "next trip" to whatever city I was writing about.

Of all the various 'Cloud based services, DB is the ONLY one which doesn't make their money off of data mining to third-party advertisers. Many people actively despise DB because of the founder's politics, and their policies could change overnight if they ever sell the company or take it public, as they're doing, but for now it's essentially the ONLY safe playfield in town!

Michael Loucks ๐Ÿšซ

@Ernest Bywater

Safer to do that by using DropBox. There's evidence Google mines what goes through Google Docs.

You could use BoxCryptor which lets you automatically encrypt anything stored on Dropbox, GoogleDrive, OneDrive, etc, etc.

https://www.boxcryptor.com/app/referral/?code=IRttHFtBqUCShjLF

I use it to ensure nobody can pry into anything I put on DropBox, etc, unless I want to share it (and BoxCryptor has ways to share encrypted files, too!)

awnlee jawking ๐Ÿšซ

@joyR

Have you considered using google docs? You could share the doc with your friend and he/she could annotate it if that's part of the plan.

If the response is any more than 'loved it' (I wish!) or 'hated it', it would be an unexpected bonus.

I'm very suspicious of cloud storage after reports of celebs having nude pictures hacked. Not having thought it through, I was thinking of sending the epub as an e-mail attachment.

AJ

joyR ๐Ÿšซ

@awnlee jawking

You do realise how vulnerable email is, don't you?

Realistically, your story isn't Beyonce's latest coochie flash, so public interest is (misguidedly) less focused on your story.

Replies:   awnlee jawking
awnlee jawking ๐Ÿšซ

@joyR

You do realise how vulnerable email is, don't you?

No, I suspect I'm underinformed on that. But media reports of hacking don't usually give the impression that e-mails were hacked in transit.

I guess it's probably a good idea if I don't label the attachment BeyoncesLatestCoochieFlash.epub ;)

AJ

Replies:   joyR
joyR ๐Ÿšซ

@awnlee jawking

Unless it's illustrated...

Then someone is going to at least give it lip service...

Ernest Bywater ๐Ÿšซ

@awnlee jawking

very suspicious of cloud storage

There's an article from way back when a famous photographer lost hundreds of thousands of photographs in his cloud storage when they shut down at short notice. Millions of people lost data stored in the cloud when the US DoJ stole all the Megaupload storage and had it destroyed without checking the content fully or trying to return any of it.

Vincent Berg ๐Ÿšซ

@awnlee jawking

If the response is any more than 'loved it' (I wish!) or 'hated it', it would be an unexpected bonus.

Sorry, Awnlee, I missed the context of your original post (assuming this is in reference to sending text copies to your beta-reader). For this, I'd suggest DB instead of Google docs, as whoever you're sending it to doesn't need to own a copy of DB (as they do with Google Docs), and if you send a WORD (or similar files), they'll automatically send them an readable online version that's easy to read. What's more DB doesn't datamine it's users data at all!

I'm very suspicious of cloud storage after reports of celebs having nude pictures hacked. Not having thought it through, I was thinking of sending the epub as an e-mail attachment.

Again, I've done that frequently and have never had a problem with it (he says, crossing his fingers and hoping his luck will continue). Though that may depend on which email client you use. For the record, I typically use Thunderbird, which like it's parent company, FireFox, is very good about protecting it's users to obnoxious data-mining companies like Google.

Vincent Berg ๐Ÿšซ

@joyR

Have you considered using google docs? You could share the doc with your friend and he/she could annotate it if that's part of the plan.

I've always avoided Google Docs, based on the experiences of other author friends of mine. If Google ever gets a complaint about your writing from ANYONE, even if utterly without merit, they'll automatically delete your account, flushing ANY work you've ever done down the tubes, and there's no hope of EVER getting it back. What's more, there's no warning, and no review or objection process.

Thus, I simply don't trust Google with ANYTHING I can't afford to lose! :(

Switch Blayde ๐Ÿšซ
Updated:

@awnlee jawking

Does Calibre preview what the converted document will look like on an e-reader

Calibre is an ebook library and e-reader, and it also converts files. So yes.

ETA: Sorry, didn't read ahead to see that Ernest already answered this.

Replies:   awnlee jawking
awnlee jawking ๐Ÿšซ

@Switch Blayde

Sorry, didn't read ahead to see that Ernest already answered this.

No worries. Thanks to both of you.

AJ

Vincent Berg ๐Ÿšซ

@awnlee jawking

I have a follow-up question. Does Calibre preview what the converted document will look like on an e-reader, or will I have to press-gang a friend into looking at it for me? I'm keen not to send the acquaintance a file of garbage.

There are various tools you can use for previewing epubs online, including one I use which displays them in FireFox (though it doesn't properly center centered graphic elements). For the other output formats, they each have their tools, the one I use most commonly is viewing how Amazon files look (which you can access during the submission process) of both phones and Kindles, in addition to iPhones and iPads.

It's not like the old days, when you had to curry favors with people who had each version of each vendors products. Now it's pretty easy to check how the text will appear.

Vincent Berg ๐Ÿšซ

@awnlee jawking

What's the simplest way for a dummy like me to convert a plain text file into something an e-reader can understand?

The easiest is probably Calibre, which if you're not used to it, is itself a bitch! Instead, I'd simply email them the text copy (assuming it's saved (under Windows) as "enhanced text" so it preserves your bolding and italics). I typically send my editors my original WORD chapter files, though I have several editors who prefer to edit via standard or html-based email messages. Whichever way I can get it to them the most easily, but still can respond by telling them what I changed and what I didn't.

Replies:   awnlee jawking
awnlee jawking ๐Ÿšซ

@Vincent Berg

so it preserves your bolding and italics

I don't use either. I think I can tell a story adequately without them. Readers might beg to disagree.

AJ

Replies:   Vincent Berg
Vincent Berg ๐Ÿšซ
Updated:

@awnlee jawking

I don't use either. I think I can tell a story adequately without them. Readers might beg to disagree.

I do it selectively, I only use bolding (within stories) for certain information, like announcements or book titles in the front matter of my books, or for my "To Be Continued" or "The End" concluding lines. However, I use italics to denote emphasis in speaking, so readers can pick on what the speaker (in dialogue) empahsizes as a way of identifying what he thinks is most important in his own statements. It may not be strictly necessary, but I like to think it makes the stories easier to read. Though honestly, no reader has either reported with it helps or is a distraction, so I don't known whether that means it's working, they don't notice it at or, or they're simply used to my doing it.

By the way, MANY authors agree with you, as bolding and italics are like internal dialogues (showing someone's thoughts), where some authors think it's fine, while others simply won't do it under any circumstances. But I suspect I'm in the minority in the amount of italics I include (as my many Forum posts aptly demonstrate).

Replies:   awnlee jawking
awnlee jawking ๐Ÿšซ

@Vincent Berg

I think the majority of my Writers' Group routinely use italics so I'm in a minority there. I'm not sure about bold. I can't remember much usage in the samples of their work that I've seen, but I can't say I was particularly looking for it.

AJ

Vincent Berg ๐Ÿšซ
Updated:

@awnlee jawking

I think the majority of my Writers' Group routinely use italics so I'm in a minority there. I'm not sure about bold. I can't remember much usage in the samples of their work that I've seen, but I can't say I was particularly looking for it.

Italics are normally what you'd use to emphasize something, while bolding is what you're use to SHOUT something, so bolding is normally held back for a few specialized cases. But what a LOT of newbie authors do, and I had to be broken of this habit myself, is they use a BUNCH of competing in-line formatting (italics sometimes, bolding others, and italic-bolding and/or underlining other times).

The key is, if you use in-line formatting at all, be consistent and don't keep changing it on the fly, as it's akin to adding extra exclamation marks to denote HOW upset someone is. That's really not what inline formatting is for, as adding twenty exclamation marks doesn't mean it's any more of an exclamation than a single one does. (You often see this on SOL to show just how earth-shattering the protonist's dates' orgasms are.)

Switch Blayde ๐Ÿšซ

@awnlee jawking

I think the majority of my Writers' Group routinely use italics

I never use bold, but I use italics for emphasized words, direct thoughts, and uncommon foreign words or dialogue spoken in a foreign language. I also use them for sound effects.

Ernest Bywater ๐Ÿšซ

the sed command line should work on a Mac as it's a Unix system at heart.

In the past I sued the 'span' commands for in-line text colour. However, I find if I have the bold and italics defined in the css and I sue the in-line spand command for the application of them within the paragraph Calibre doesn't create an new mini-css for that chapter to add in it's own span commands and css for the bold and italics.

By the time I have everything set on the css for making the e-pub everything in the main body text is covered.

Replies:   Vincent Berg
Vincent Berg ๐Ÿšซ

@Ernest Bywater

In the past I sued the 'span' commands for in-line text colour. However, I find if I have the bold and italics defined in the css and I sue the in-line spand command for the application of them within the paragraph Calibre doesn't create an new mini-css for that chapter to add in it's own span commands and css for the bold and italics.

I went back and looked into that, trying to figure out how to limit the italic and bold commands in either the Style Defs or in the CSS, but couldn't figure out how to do it. It's easy to do with Style Defs, simply to preemptively deleting ALL the commands before defining you own, but that won't affect the in-line formatting. (< span>< /span> commands are just so inelligent, it grates on my inner programmer pride):(

Replies:   Ernest Bywater
Ernest Bywater ๐Ÿšซ

@Vincent Berg

(< span>< /span> commands are just so inelligent, it grates on my inner programmer pride):(

I agree, but the epub resulting from that html file is cleaner and smaller, so I just live with it.

Replies:   Vincent Berg
Vincent Berg ๐Ÿšซ

@Ernest Bywater

I agree, but the epub resulting from that html file is cleaner and smaller, so I just live with it.

And I was still searching for a way to accomplish it from withing the central CSS (or using a single reference to the same style-definition html file)).

If I can find a way of combining them, I'll let you know, but until then, I'm still holding out hope that I'll eventually discover the Holy Grail. :(

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.