Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 05-19-2009, 09:16 AM   #46
pepak
Guru
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
Quote:
Originally Posted by rogue_ronin View Post
I'm wondering if a different <link> tag in the head might allow you to call some customizations? I'm just spit-balling here -- I have no idea how the <link> tag works; but if the CSS file is read in the head, it makes me wonder if you could use one of the other rel="" attribute/values to call a set of entity redefinitions? Like maybe a "section" or a "bookmark"
No, but you can:
1) Link multiple stylesheets using multiple LINKs. You can even define that one stylesheet is to be used by all renderers, one stylesheet only by renderer that outputs to paper pages, one for screen renderers, one for voice renderers etc.
2) Import one stylesheet from within another stylesheet.
3) Use my H2LRF which lets you import a specific stylesheet based on the target device of your conversion :-)
pepak is offline   Reply With Quote
Old 05-19-2009, 09:21 AM   #47
pepak
Guru
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
Anyway, as far as styling is concerned, there are two alternate approaches that you can take. Both will work fine:

1) Study CSS carefully and then design you XHTML specifications so that they let you use the styling you like.

2) Make sure your XHTML uses plenty of structural information (a consistent set of classes used frequently) and just assume that when you are done with your XHTML, someone will be able to style it according to your needs.

Even #2 will work fine - CSS is a very powerful tool. It is not all-powerful, there are things that it can't do, and things it can't do without help in the XHTML, but overall, it can do a whole lot. Check the classical site of CSS Zen Garden to see what I mean - all those different pages actually use the same XHTML markup, only the CSS sheet is different in each of them.
pepak is offline   Reply With Quote
Advert
Old 05-19-2009, 09:57 AM   #48
Sweetpea
Grand Sorcerer
Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.
 
Sweetpea's Avatar
 
Posts: 9,707
Karma: 32763414
Join Date: Dec 2008
Location: Krewerd
Device: Pocketbook Inkpad 4 Color; Samsung Galaxy Tab S6
Quote:
Originally Posted by pepak View Post
Actually, quotes, are quite doable using regular expressions. This regexp won't work 100%, but it will work most of the time:

Search = ([>_])’(.*?[^a-z_])’([<_])
Replace = $1opening_quote$2closing_quote$3

(note: underscore in the search string represents a space)
Could you explain that regex? My tool apparently uses a completely different form of regex....

Edit:
(never mind that, I have to escape the ( and ) ...)

But, once I got it working I noticed something else:

Quote:
<p>'What if,' she said, 'there's something like this?'</p>

Last edited by Sweetpea; 05-19-2009 at 10:05 AM.
Sweetpea is offline   Reply With Quote
Old 05-19-2009, 10:22 AM   #49
pepak
Guru
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
Quote:
Originally Posted by Sweetpea View Post
Could you explain that regex? My tool apparently uses a completely different form of regex....

Edit:
(never mind that, I have to escape the ( and ) ...)
There parentheses should not be escaped.

Quote:
But, once I got it working I noticed something else:
Apparently your regexp is incorrect.

What my regexp searches for:
- either a space or a >
- apostrophe
- any number of characters (non-greedy - cosume as few as possible)
- any single character except for letters and spaces
- apostrophe
- either a space or a <
pepak is offline   Reply With Quote
Old 05-19-2009, 10:23 AM   #50
pepak
Guru
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
I assume that your example of
Code:
<p>'What if,' she said, 'there's something like this?'</p>
got changed into
Code:
<p>&lsquo;What if,' she said, 'there's something like this?&rsquo;</p>
? If that is the case, then the problem lies in step 3 above - I used a non-greedy mode (.*?) while you used a greedy mode (.*).
pepak is offline   Reply With Quote
Advert
Old 05-19-2009, 11:07 AM   #51
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by pepak View Post
What my regexp searches for:
- either a space or a >
- apostrophe
- any number of characters (non-greedy - cosume as few as possible)
- any single character except for letters and spaces
- apostrophe
- either a space or a <
OK, in VIM that's:
Code:
\([> ]\)'\(.\{-}[^a-z ]\)'\([< ]\)
( \( and \) to group, \{-} for non-greedy multiple match)
Jellby is offline   Reply With Quote
Old 05-20-2009, 01:56 AM   #52
Sweetpea
Grand Sorcerer
Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.
 
Sweetpea's Avatar
 
Posts: 9,707
Karma: 32763414
Join Date: Dec 2008
Location: Krewerd
Device: Pocketbook Inkpad 4 Color; Samsung Galaxy Tab S6
Quote:
Originally Posted by pepak View Post
There parentheses should not be escaped.
I must escape those parentheses to make a grouping.

My tool doesn't understand the non-greedy part, apparently... Time to figure out how to use that!
Sweetpea is offline   Reply With Quote
Old 10-08-2010, 09:52 AM   #53
WillAdams
Wizard
WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.
 
WillAdams's Avatar
 
Posts: 1,234
Karma: 3350652
Join Date: Feb 2008
Device: Amazon Kindle Paperwhite (300ppi), Samsung Galaxy Book 12
All of which is why sensible markup systems (like TEI) include a way to indicate the beginning and end of quoted text so that it can be properly transformed to what is required.
WillAdams is offline   Reply With Quote
Old 10-21-2013, 04:45 PM   #54
Bompa65
Connoisseur
Bompa65 is less competitive than you.Bompa65 is less competitive than you.Bompa65 is less competitive than you.Bompa65 is less competitive than you.Bompa65 is less competitive than you.Bompa65 is less competitive than you.Bompa65 is less competitive than you.Bompa65 is less competitive than you.Bompa65 is less competitive than you.Bompa65 is less competitive than you.Bompa65 is less competitive than you.
 
Bompa65's Avatar
 
Posts: 50
Karma: 14858
Join Date: Oct 2013
Location: Ontario, Canada
Device: Kobo Vox
I have just finished doing my first epub makeover that I downloaded from Gutenberg's.

I used calibre to convert it from epub to a .txt file. Opened the txt file in MS Word 2007, did my editing, saving my changes in the books file in Calibre.

The only changes I really made was the stuff that didn't scan properly, some spelling errors, but nothing to change the authors style.

I than converted it back into epub, using calibre, and voila a book that is easier to read!

Bompa65 is offline   Reply With Quote
Old 10-22-2013, 03:13 AM   #55
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Converting to text format is really not a terribly good idea. You'll lose all the formatting as a result.
HarryT is offline   Reply With Quote
Old 10-22-2013, 07:21 AM   #56
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
Sigil is a free program that you can use to edit non DRM epubs from anywhere including Project Gutenberg. It has a very powerful spellcheck that will allow you to correct all errors of the same kind at once and will not lose formatting from the original. It does not add in additional stuff the way calibre does. It is worth trying and it is well supported on a forum here at mobileread.
mrmikel is offline   Reply With Quote
Old 10-23-2013, 11:59 AM   #57
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,804
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Bompa65 View Post
I have just finished doing my first epub makeover that I downloaded from Gutenberg's.

I used calibre to convert it from epub to a .txt file. Opened the txt file in MS Word 2007, did my editing, saving my changes in the books file in Calibre.

The only changes I really made was the stuff that didn't scan properly, some spelling errors, but nothing to change the authors style.

I than converted it back into epub, using calibre, and voila a book that is easier to read!

Going to txt (ASCII) will lose all font styling (italic, bold, sub/superscipts)
IMHO not the best way to proceed with a working book (That is a last resort for a book, so damaged that it can't even be fixed with Calibre/Sigil).
theducks is offline   Reply With Quote
Old 10-23-2013, 02:24 PM   #58
Bompa65
Connoisseur
Bompa65 is less competitive than you.Bompa65 is less competitive than you.Bompa65 is less competitive than you.Bompa65 is less competitive than you.Bompa65 is less competitive than you.Bompa65 is less competitive than you.Bompa65 is less competitive than you.Bompa65 is less competitive than you.Bompa65 is less competitive than you.Bompa65 is less competitive than you.Bompa65 is less competitive than you.
 
Bompa65's Avatar
 
Posts: 50
Karma: 14858
Join Date: Oct 2013
Location: Ontario, Canada
Device: Kobo Vox
Thanks I'll try Sigil

That is quite the program! So easy to use (so far)!

thanks everybody.

Last edited by Bompa65; 10-23-2013 at 06:22 PM. Reason: Update
Bompa65 is offline   Reply With Quote
Old 10-25-2013, 07:37 AM   #59
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
If epub or html is available, you get a giant running start using Sigil.

The only gotcha I would warn you of it that you can NOT undo a global search and replace. So save before each global search and replace so you can go back to the previous one if it goes amok.

One way to avoid too much damage is to select text, then right click to "mark" it. Then you can confine your actions to just one section. If successful, then right click to unmark it.
mrmikel is offline   Reply With Quote
Old 11-17-2013, 01:34 PM   #60
GibbinR
Connoisseur
GibbinR ought to be getting tired of karma fortunes by now.GibbinR ought to be getting tired of karma fortunes by now.GibbinR ought to be getting tired of karma fortunes by now.GibbinR ought to be getting tired of karma fortunes by now.GibbinR ought to be getting tired of karma fortunes by now.GibbinR ought to be getting tired of karma fortunes by now.GibbinR ought to be getting tired of karma fortunes by now.GibbinR ought to be getting tired of karma fortunes by now.GibbinR ought to be getting tired of karma fortunes by now.GibbinR ought to be getting tired of karma fortunes by now.GibbinR ought to be getting tired of karma fortunes by now.
 
Posts: 81
Karma: 6788226
Join Date: Feb 2011
Location: Chester, UK
Device: Kobo Aura One, iPad mini 5, Kindle Oasis 3
Punctuation is the practice of printers?

I've recently been puzzling away about the different punctuation conventions used in different editions of the same book, particularly with respect to quoting.
1. In some books, speech is surrounded by double quotes, and in others by single quotes.
As an example the Gutenberg 'Forsyte Saga' has double quotes, but both the Penguin paperback and the Kindle edition of the same book have single quotes.
When I first noticed this, a couple of years ago, I assumed that the Penguin compositors had just changed things to fit with their style guide, the same way that they seem to change 'em dash' into 'space, en dash, space', and 'semicolon, space' to 'space, semicolon, space'.
I also assumed that the Gutenberg was taken from an earlier edition, and that the Penguin compositors were probably just modernising in accordance with contemporary practice.
However I have recently been noticing that some fairly recent American editions of books also have double quotes. As an example I recently bought "The Book of The Ler" Kindle edition. a rather wonderful (IMHO) science fiction trilogy written from 1975-79 and recently republished by DAW, the original US publisher as an ebook. As it happens I also have the original paperbacks from the '70s. The first two volumes were published in Britain and have single quotes, the last volume I bought as an import and it has double quotes. The kindle edition, published in 2006 has double quotes throughout.
So I'm wondering if there is any general rule here. Is it the case that US practice is and always was double quotes, and British practice is and always was single quotes? Or could it be that 19th century practice was one way, and things gradually changed and at different rates in Britain and the US? Or is it just different by publishing house and even by book.
2. Actually, of course, to talk about which quotes get used is rather over-simplifying, because you do run across both inner and outer quotes. Working recently on 'The Golden Bowl' by Henry James, I became painfully aware of this. To give an example from fairly early in Chapter 1:
... "What do you mean, please, by my having 'done' with you?" ...
has both inner and outer quotes (as I think of them). So question 1 above really becomes 'single inside double' vs 'double inside single'.
However in some way that I can't quite properly articulate, there is another related punctuation difference that one sees, and this relates to whether related punctuation is included in the quotes or just outside it.
To give another example from 'The Golden Bowl' early in Chapter 1:
... poor Calderoni, fresh from Rome and now apparently in the wondrous situation of being "shown London," before promptly leaving it again...
In the Gutenberg text, shown above, there is a comma between 'London' and the closing quote. In both the Penguin Classics edition of 1966 and the Oxford World's Classics edition of 1983 or 1999 the comma comes after the closing quote (and in both these cases the quote is single):
... poor Calderoni, fresh from Rome and now apparently in the wondrous situation of being 'shown London', before promptly leaving it again...
I can't quite articulate it precisely but the latter case(s) only seem to happen when what is being quoted is a short phrase rather than a full sentence or reasonably large part of one. So for example from slightly later in 'The Golden Bowl' Chapter 1:
"Oh, you'll hear enough of it," she laughed, "before you've done with us."
has the punctuation inside the quotes in all three editions.
It also appears to me that related punctuation outside enclosing quotes only ever happens in books where the quote convention is single inside double, but I haven't spent much time checking this.

Now if any hardy souls are still reading this append, the reason for posing this problem is that like a lot of other people who add books to MobileRead, my basic source is Gutenberg, which is a collection of transcriptions of books mostly published in the USA.
Mostly what interests me are books written by English authors in the 19th and early 20th centuries, and I would like to restore them as far as possible to their original form. Most Gutenberg texts have outer double quotes, and related punctuation inside fragment quotes. I am increasingly suspecting that it would be more authentic (for English authors) to invert this to outer single quotes and related punctuation outside fragment quotes?
GibbinR is offline   Reply With Quote
Reply

Tags
conversion, typography


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle Typography ChaoZ Amazon Kindle 21 08-14-2010 12:50 PM
Is there hope for better ebook typography? tomsem Amazon Kindle 0 08-12-2010 10:44 PM
Typography on the iPad LDBoblo Apple Devices 1 04-14-2010 03:33 PM
French Typography ahi Workshop 14 09-16-2009 02:22 PM
Chinese Typography ahi Workshop 81 09-14-2009 09:34 AM


All times are GMT -4. The time now is 09:00 AM.


MobileRead.com is a privately owned, operated and funded community.