Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book General > Writers' Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 09-04-2013, 12:37 PM   #31
gmw
cacoethes scribendi
gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.
 
gmw's Avatar
 
Posts: 5,809
Karma: 137770742
Join Date: Nov 2010
Location: Australia
Device: Kobo Aura One & H2Ov2, Sony PRS-650
Quote:
Originally Posted by ApK View Post
It doesn't HAVE to just because it's HTML based. I mean, I'm not doubting it does in the app you're using, but HTML does include mechanisms for increasing white space.

In fact, I just tried a straight test in IE 10 and Chrome and they both show the difference between one and two spaces clearly, with no special markup.
Spoiler:
Actually it does, according to the standard. Specified whitespace characters are separators only. CR and LF are also whitespace characters. All whitespace should be consolidated back to represent a single break between words. The behaviour you see in your browsers is definitely non-compliant. Do you see any difference if you place the text inside <p>...</p> ? (Which is how any ebook will present its paragraphs.)

Quote:
Originally Posted by ApK View Post
Then there are <pre> tags, &nbsp, and more.
Yes, there are options, but few are as easy to achieve as a double-tap on the spacebar.

The plugin I use to export from LibreOffice actually converts <space><space> to &nbsp;<space>, but this has it's own problems (upsets justification), so I always remove double-spaces before export.
gmw is offline   Reply With Quote
Old 09-04-2013, 01:14 PM   #32
ApK
Award-Winning Participant
ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.
 
Posts: 7,316
Karma: 67862884
Join Date: Feb 2010
Location: NJ, USA
Device: Kindle
Quote:
Originally Posted by gmw View Post
Actually it does, according to the standard. Specified whitespace characters are separators only. CR and LF are also whitespace characters. All whitespace should be consolidated back to represent a single break between words. The behaviour you see in your browsers is definitely non-compliant.
I don't think that is strictly correct. The actual standard that your link references specifically and emphatically (it's capitalized) says it MAY be treated that way, not that it must or should.
http://www.ietf.org/rfc/rfc2616.txt

Quote:
Originally Posted by gmw View Post
Do you see any difference if you place the text inside <p>...</p> ? (Which is how any ebook will present its paragraphs.)
It worked the same in p tags. I actually generated the html in MS Word to see if it did anything special to preserve the spaces, since I knew it did preserve them. Then I stripped out the styles, p tags and additional stuff until I got down to the minimum I used for illustration.

Quote:
Yes, there are options, but few are as easy to achieve as a double-tap on the spacebar.
The presumption is you would just hit the spacebar twice in whatever app you are using. The app would then generate any needed markup to preserve the extra space in HTML, just as I'm sure it does in MS Word when you save as HTML.

So again, my point was: just because an app creates HTML doesn't mean your two spacebar hits won't have a double space effect. It often will.

Last edited by ApK; 09-04-2013 at 01:25 PM.
ApK is offline   Reply With Quote
Old 09-04-2013, 03:21 PM   #33
Katsunami
Grand Sorcerer
Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.
 
Katsunami's Avatar
 
Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
Quote:
Originally Posted by James_Wilde View Post
I learned to type on a typewriter, and learned that one puts two spaces after a full stop (period for the US) and after a colon. I still use this - it's ingrained - and I get a lot of stick from my son, who had grown up in the computer age, and maintains that these extra spaces can cause problems - what problems he didn't say.p
If I were you, I'd use just one space. There may be a very good reason why you should use two on a typewriter, but on a computer, there's no need to do that. They can't cause problems(1), but they're not really necessary. I learned to type on a typewriter as well, but was never taught to use multiple spaces. (And a year later, I switched to a PC anyway.)

I do see people using punctuation in weird ways, such as putting one or more spaces in front of comma's or stops, or using comma's where apostrophes must be, or the other way around, or combinations of these things. I've actually seen people consistently use the inverted ? and ! in place where a normal ? or ! should be. (No, they were not Spanish or anything.)

Often I wonder where people pick up these weird habits.

(1) Except in some programming languages, that require some specific number of spaces or tabs (or other white space) before or after certain statements, as part of their syntax.

Quote:
Originally Posted by BeccaPrice View Post
wars have been started over less.
Like if you should crack the egg on the pointy top or on the round bottom when you get to eat it?

Last edited by Katsunami; 09-04-2013 at 03:41 PM.
Katsunami is offline   Reply With Quote
Old 09-04-2013, 03:54 PM   #34
ApK
Award-Winning Participant
ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.
 
Posts: 7,316
Karma: 67862884
Join Date: Feb 2010
Location: NJ, USA
Device: Kindle
Quote:
Originally Posted by Katsunami View Post
Like if you should crack the egg on the pointy top or on the round bottom when you get to eat it?
You're not one of those wacko big-endians, are you?
ApK is offline   Reply With Quote
Old 09-04-2013, 04:36 PM   #35
Katsunami
Grand Sorcerer
Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.
 
Katsunami's Avatar
 
Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
Quote:
Originally Posted by ApK View Post
You're not one of those wacko big-endians, are you?
Have a problem with big-endians? Besides that, my bit is more significant than your bit!

I think most people won't get your reference... I don't even know if you mean it like I think you do, because nowadays it's of no consequence, except if you're doing some really low level programming.

Heck... Endianness even wasn't part of my education anymore, and I program microcontrollers. I had to worry about it only once in my life up until now. Go figure. Most people of my age and younger won't even know what it is.

Doesn't that make you very old, compared to me?


Last edited by Katsunami; 09-05-2013 at 09:57 AM.
Katsunami is offline   Reply With Quote
Old 09-04-2013, 09:56 PM   #36
ApK
Award-Winning Participant
ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.
 
Posts: 7,316
Karma: 67862884
Join Date: Feb 2010
Location: NJ, USA
Device: Kindle
Quote:
Originally Posted by Katsunami View Post
I think most people won't get your reference... I don't even know of you mean it like I think you do
The funny thing is, I knew the computer science term for many years, but only read Gulliver's Travels last year. I cracked up (hehe... egg pun!) when I realized that's where it came from.
Points to you for knowing both meanings, young padawan.
ApK is offline   Reply With Quote
Old 09-05-2013, 07:42 AM   #37
gmw
cacoethes scribendi
gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.
 
gmw's Avatar
 
Posts: 5,809
Karma: 137770742
Join Date: Nov 2010
Location: Australia
Device: Kobo Aura One & H2Ov2, Sony PRS-650
Quote:
Originally Posted by ApK View Post
I don't think that is strictly correct. The actual standard that your link references specifically and emphatically (it's capitalized) says it MAY be treated that way, not that it must or should.
http://www.ietf.org/rfc/rfc2616.txt[...]
The reason why RFC2616 (HTTP) can choose to do what it wants with the whitespace is exactly because "linear whitespace" is defined to have no significance beyond separation of "words" (whatever the words may mean in a given context). For interpretation purposes the processor (eg: browser) is supposed to read the contents of the text as a series of words and pay no attention to how much linear whitespace exists between each one. (Unless the text is enclosed in <pre>...</pre>, as are my code examples are below - if you check the raw HTML of this page.)

Code:
<p>This and that.</p>
should be interpreted as identical to:

Code:
<p>This

       and 

  that.<p>
I may not like some of the rules in HTML and XML, but this one has been clear for as long as I know about.

On my computer (Windows 7), Opera 12, Firefox 17, and Internet Explorer 9 all get it right.

Last edited by gmw; 09-05-2013 at 07:45 AM.
gmw is offline   Reply With Quote
Old 09-05-2013, 08:02 AM   #38
ApK
Award-Winning Participant
ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.
 
Posts: 7,316
Karma: 67862884
Join Date: Feb 2010
Location: NJ, USA
Device: Kindle
Quote:
Originally Posted by gmw View Post
I may not like some of the rules in HTML and XML, but this one has been clear for as long as I know about.

On my computer (Windows 7), Opera 12, Firefox 17, and Internet Explorer 9 all get it right.
I was actually surprised that it worked in my example (well, I was surprised it worked in Chrome...IE I've come to expect to be non-compliant). I fully expected to need an &nbsp, or to see Word use some complex style.
ApK is offline   Reply With Quote
Old 09-05-2013, 08:23 AM   #39
gmw
cacoethes scribendi
gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.
 
gmw's Avatar
 
Posts: 5,809
Karma: 137770742
Join Date: Nov 2010
Location: Australia
Device: Kobo Aura One & H2Ov2, Sony PRS-650
Quote:
Originally Posted by ApK View Post
I was actually surprised that it worked in my example (well, I was surprised it worked in Chrome...IE I've come to expect to be non-compliant). I fully expected to need an &nbsp, or to see Word use some complex style.
I just grabbed a copy of Chrome (v29 apparently), it gets both your example and mine correct on my machine. Is there any chance the editor you were using to create the source used some invisible Unicode space character other than a normal space? ... ETA: Scratch that, looking at the screen capture it's encoding 1252 - not Unicode.

ETA (again). I could simulate what you see by copying a literal non-breaking-space from the character map into an ANSI 1252 encoded text file. If you can get a hex view you may find those "spaces" are 0xA0 characters (if no hex, trying using Ctrl+Right to jump between words and see if it can't find the start of the second testing).

Last edited by gmw; 09-05-2013 at 08:42 AM.
gmw is offline   Reply With Quote
Old 09-05-2013, 09:26 AM   #40
ApK
Award-Winning Participant
ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.ApK ought to be getting tired of karma fortunes by now.
 
Posts: 7,316
Karma: 67862884
Join Date: Feb 2010
Location: NJ, USA
Device: Kindle
Quote:
Originally Posted by gmw View Post
ETA (again). I could simulate what you see by copying a literal non-breaking-space from the character map into an ANSI 1252 encoded text file. If you can get a hex view you may find those "spaces" are 0xA0 characters (if no hex, trying using Ctrl+Right to jump between words and see if it can't find the start of the second testing).
You are correct. The hex shows c2 a0 20 in the long break and just 20 in the short break. So Word does do something special to preserve the double space. If I put all 20s in place, it collapses as expected.
So, there we go. There's one way an app preserves double spaces after periods in HTML.

ApK
ApK is offline   Reply With Quote
Old 09-05-2013, 09:44 AM   #41
gmw
cacoethes scribendi
gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.
 
gmw's Avatar
 
Posts: 5,809
Karma: 137770742
Join Date: Nov 2010
Location: Australia
Device: Kobo Aura One & H2Ov2, Sony PRS-650
Quote:
Originally Posted by ApK View Post
You are correct. The hex shows c2 a0 20 in the long break and just 20 in the short break. So Word does do something special to preserve the double space. If I put all 20s in place, it collapses as expected.
So, there we go. There's one way an app preserves double spaces after periods in HTML.

ApK
Yep. As I noted in a previous post, my epub export will do that for me (but sensibly uses &nbsp; not 0xa0), however nbsp upsets justification (you get unexpected dents in the justification). I suspect any non-standard whitespace may result in the same visual disruption, but haven't played around to see if any are smart enough to deal with other Unicode space characters.
gmw is offline   Reply With Quote
Old 09-05-2013, 10:35 AM   #42
Freeshadow
temp. out of service
Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.
 
Posts: 2,792
Karma: 24285242
Join Date: May 2010
Location: Duisburg (DE)
Device: PB 623
Quote:
Originally Posted by Katsunami View Post
If I were you, I'd use just one space. There may be a very I do see people using punctuation in weird ways, such as putting one or more spaces in front of comma's or stops, or using comma's where apostrophes must be, or the other way around, or combinations of these things. I've actually seen people consistently use the inverted ? and ! in place where a normal ? or ! should be. (No, they were not Spanish or anything.)

Often I wonder where people pick up these weird habits.
As for space put before punctuation marks, it's AFAIR correct in French orthography.

In Polish in specific cases (dialogue) dashes are used where a Westeuropean might expect quotation marks.
"In a quote inside an other:« this would be it.»„

But a lot of the other oddities you mentioned puzzle me too.
Freeshadow is offline   Reply With Quote
Old 09-05-2013, 10:50 AM   #43
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
Quote:
Originally Posted by Freeshadow View Post
As for space put before punctuation marks, it's AFAIR correct in French orthography.
Some punctuation marks. IIRC you put a space before a semi-colon, a colon, and a question mark, but not before a comma or a full stop.
HarryT is offline   Reply With Quote
Old 09-05-2013, 11:02 AM   #44
Freeshadow
temp. out of service
Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.
 
Posts: 2,792
Karma: 24285242
Join Date: May 2010
Location: Duisburg (DE)
Device: PB 623
*shame* indeed... Thanks for refreshing my memory Harry. It's years ago I had to use French in written form - and it certainly is the foreign tongue I was taught with the smallest success.
Freeshadow is offline   Reply With Quote
Old 09-05-2013, 11:05 AM   #45
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
Quote:
Originally Posted by Freeshadow View Post
*shame* indeed... Thanks for refreshing my memory Harry. It's years ago I had to use French in written form - and it certainly is the foreign tongue I was taught with the smallest success.
No shame necessary - my memory of it is equally vague!
HarryT is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
special spaces exaltedwombat Sigil 6 03-02-2013 09:40 AM
file name contains spaces bmacklin ePub 3 09-20-2012 05:07 PM
cannot do find replace all on full stop. cybmole Sigil 5 07-23-2011 02:28 PM
embedded spaces rikm Calibre 1 06-03-2010 03:08 PM
Non breaking spaces? troymc Sigil 6 05-22-2010 07:47 AM


All times are GMT -4. The time now is 08:47 PM.


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