Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 05-01-2011, 12:10 PM   #1
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
different epub interpretations of <br> ?

i noice that when I add line space via sigil book view

e.g. I change from

line 1 followed by
line 2


so that I see

line 1 followed by

line 2


then sigil does this by adding code like
<p class="whatever"><br /></p>

where the class is whatever is in use on other paragraphs.

This "works" i.e. looks good in sigil book view, & also looks good in calibre epub viewer, but when I send to my Sony 650, the line spaces are not visible .i.e. the Sony apparently completely ignores lines like <p class="whatever"><br /></p>

IS the epub spec ambiguous, or is Sony e-reader software out of lien with rest of world ?

PS I Know that I am supposed to use proper styles & not lazy <br /> tags, but if I am in book view and want to separate blocks of text , e.g. to put extra space around a quote or a subheading, it would be good to be able to just hit ENTER & get consistent results on all devices.

I have had to resort to explicity hitting space bar a couple of times, not just hitting enter, to get results I want.

is especially annoying with sigil's indent feature,which adds blockquote tags, as Sony seems to also ignore any blockquote styling & shows the indented text with zero top & bottom margin - stripping any <br> lines.

Last edited by cybmole; 05-01-2011 at 12:14 PM.
cybmole is offline   Reply With Quote
Old 05-01-2011, 12:22 PM   #2
Pablo
Guru
Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.
 
Pablo's Avatar
 
Posts: 970
Karma: 4999999
Join Date: Mar 2009
Location: Rosario, Argentina
Device: SONY PRS-505, PRS-T2
Yes, hitting enter in book view is useless. You have to use proper styles in code view. Hitting the space bar a couple of times and then enter will probably result in
<p class="whatever">&nbsp;&nbsp;</p> which is not a good idea either.
An interesting addition to Sigil would be the ability to specify the behaviour when the enter key is pressed in book view. Options could be: (1) Add class xxx to next paragraph (2) Add class xxx to previous paragraph (3) Add empty paragraph (4) Add br tag.
Pablo is offline   Reply With Quote
Old 05-01-2011, 12:41 PM   #3
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
Quote:
Originally Posted by Pablo View Post
. Hitting the space bar a couple of times and then enter will probably result in
<p class="whatever">&nbsp;&nbsp;</p> which is not a good idea either.
that is exactly what it does result in!

IT may offend purists but it does the job alright though in that I get consistency between PC viewers & e-readers. - a blank line in all cases - whereas the simple <br> is treated inconsistently.
cybmole is offline   Reply With Quote
Old 05-01-2011, 03:42 PM   #4
EowynCarter
Wizard
EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.
 
Posts: 4,332
Karma: 4000000
Join Date: Oct 2008
Location: Paris
Device: Cybooks; Sony PRS-T1
As far as I know :
<p>whatever</p>
<p>whatever</p>

will get :
watever

watever

There already is a space between paragraphs, Unless the css says otherwise....

And the <br/> is a simple ligne change.
ie
<p>whatever<br/>
whatever</p>
<p>whatever<br/>
whatever</p>

will get:
whatever
whatever

whatever
whatever

Last edited by EowynCarter; 05-01-2011 at 03:45 PM.
EowynCarter is offline   Reply With Quote
Old 05-01-2011, 03:51 PM   #5
st_albert
Guru
st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'
 
Posts: 688
Karma: 150000
Join Date: Feb 2010
Device: none
I know I'll get my share of flames from purists as well, (and rightly so) but I use a "belt-and-suspenders" approach, inserting this into the html:

<p class="linebreak" >&nbsp;<br /></p>

along with a CSS rule like:

p.linebreak { line-height: 0.8em; margin-top: 0.0em; margin-bottom: 0.0em; }

or similar. This seems to work for all the readers I normally check.
st_albert is online now   Reply With Quote
Old 05-02-2011, 12:39 AM   #6
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
my gripe was that it is a chore to have to switch to code view & type all that stuff, if all I want to do is insert a blank line while in book view!

and my question was: is there an epub spec that says what a reader should do when it encounters a line containing only a <br /> tag - as Sony's interpretation seems to be to ignore it ? i.e. to ignore <p><br /><p> constructs

Last edited by cybmole; 05-02-2011 at 12:41 AM.
cybmole is offline   Reply With Quote
Old 05-02-2011, 01:16 AM   #7
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
Quote:
Originally Posted by cybmole View Post
my gripe was that it is a chore to have to switch to code view & type all that stuff, if all I want to do is insert a blank line while in book view!

and my question was: is there an epub spec that says what a reader should do when it encounters a line containing only a <br /> tag - as Sony's interpretation seems to be to ignore it ? i.e. to ignore <p><br /><p> constructs
It is unlikely to be in the spec for ePUB since it really references the xhtml spec for this sort of thing. You can check W3C but ADE as used by Sony doesn't always follow the spec anyway and you are stuck. There is nothing you can do about it.

Dale
DaleDe is offline   Reply With Quote
Old 05-02-2011, 04:17 AM   #8
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,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by cybmole View Post
the Sony apparently completely ignores lines like <p class="whatever"><br /></p>

IS the epub spec ambiguous, or is Sony e-reader software out of lien with rest of world ?
All I can find is in the HTML 4 spec (which is inherited by XHTML and ePUB):

"User agents should ignore empty P elements."

and previously:

"authors should not rely on user agents to render white space immediately after a start tag or immediately before an end tag"

where "whitespace" means (in XHTML) any of:

SPACE (& #x0020;)
HORIZONTAL TABULATION (&#x0009;)
CARRIAGE RETURN (&#x000D;)
LINE FEED (&#x000A;)

Thus, <p>&nbsp;</p> is not empty, because &nbsp; is not whitespace and it's not ignored. And in my interpretation, <p><br/><p> is not empty either, but it seems the Adobe engine (used by the Sony reader) is removing the <br/> immediately preceding </p> (I think it was mentioned in another thread), so the paragraph becomes empty.

My advice, as expected is to convert all <p><br/><p> into an appropriate class for the following (or previous) paragraph.
Jellby is offline   Reply With Quote
Old 05-02-2011, 05:31 AM   #9
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
As Jellby says -
Search for
<p><br /></p>

Replace with
<p>&nbsp;</p>
Perkin is offline   Reply With Quote
Old 05-02-2011, 05:44 AM   #10
EowynCarter
Wizard
EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.
 
Posts: 4,332
Karma: 4000000
Join Date: Oct 2008
Location: Paris
Device: Cybooks; Sony PRS-T1
Quote:
Originally Posted by cybmole View Post
my gripe was that it is a chore to have to switch to code view & type all that stuff, if all I want to do is insert a blank line while in book view!

and my question was: is there an epub spec that says what a reader should do when it encounters a line containing only a <br /> tag - as Sony's interpretation seems to be to ignore it ? i.e. to ignore <p><br /><p> constructs
the br tag jumps one line.

<p>text</p>
<p><br/></p>
<p>text2</p>

should give
text



text2

Or, admiting the <p><br/></p> is totally ignored,

text

text2
EowynCarter is offline   Reply With Quote
Old 05-02-2011, 07:24 AM   #11
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,689
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
My 2cents. I can see the ADE interpretation.

<br /> is a tag, not a printing character like &nbsp;

to force an extra new line, they should be used in pairs
theducks is offline   Reply With Quote
Old 05-03-2011, 12:59 PM   #12
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
so is it that no software is right or wrong - it's all grey area interpretation ?

is sigil "right" to create an unpaired <br /> tag when you press enter in book mode ? any mileage in calling that a bug / request a different treatment via future enhancements ?

the ability to insert line space in book view is IMHO, a needed feature.
Many free book sources e.g. William Gibson sprawl trilogy - which is free online in HTML - have had all soft break / scene break code stripped and so to improve an ebook/epub version & make it like the printed copy there is a frequent need to insert blank lines when proofing.

The "obvious" way to do that quickly is to scan the text in book view, with a purchased or library paper book copy in one hand, & hit enter whenever a soft break needs adding.;but because of the <br> issues above, it is clearly not the "best" way.

I only realised that this simple fix was not working, for Sony reader, after fixing up 2 entire books that way !
cybmole is offline   Reply With Quote
Old 05-03-2011, 03:22 PM   #13
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
For I a blank line I always use <p>&nbsp;</p>. Some purist will say that I have to solve it with margins for specific paragraphs, but it works.
Toxaris is offline   Reply With Quote
Old 05-03-2011, 04:52 PM   #14
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
As far as the purist approach of adding margins to specific paragraphs goes, it's fine for general margins across the doc, but for softbreaks specifically I think <p>&nbsp;</p> is the best solution. This is primarily because of the possibility of format shifting. <p>&nbsp;</p> is MUCH less likely to be ignored during a format shift, whereas css margins get lost in translation all the time.

@cybmole, <br /> does not need to be paired with a closing tag because it's self closing. Stick with book view and just hit enter followed by spacebar for soft breaks and you'll get <p>&nbsp;</p>, which a fair number of users in this thread are voting for. <br /> is really meant to be used inside a populated paragraph, not an empty one, at least in the epub world where Adobe is currently the primary renderer on readers.
ldolse is offline   Reply With Quote
Old 05-04-2011, 01:05 AM   #15
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
Quote:
Originally Posted by Perkin View Post
As Jellby says -
Search for
<p><br /></p>

Replace with
<p>&nbsp;</p>
Yes, I am training myself to press space, then enter when adding scene break space in book mode, & fixing old edits as you say.

I see the possible logic of why the <br> by itself is ignored. the sony ( = ADE?) engine maybe thinks to itself. "I'm being told to start a new line, but I am already at the start of a line so I don't need to do anything here "

a future enhancement could be to have an "add scene break" icon alongside the bold, italic etc buttons, for use in book mode.

the next nice-to-have would then be a remove indent button for use on the line following the scene break.

those 2 features would make book mode a more powerful WYSIWYG tool
cybmole is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Old Thread] Reading epub on viewer inexplicably changes the time stamp of epub greenapple Library Management 20 03-19-2011 10:18 PM
epub, ePub, EPUB, warum blos ePub? flowoeB Lounge 5 11-27-2009 09:37 AM
Bad movie interpretations pshrynk Lounge 69 06-27-2008 10:06 AM


All times are GMT -4. The time now is 02:48 PM.


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