Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 06-03-2025, 04:51 AM   #1
robertmchicago
Enthusiast
robertmchicago began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Apr 2025
Device: none
writing text for epub3

I am writing a reflowable epub 3. I have learned a lot, but I am still learning.
I know that we do this:
use &lt; instead of <
use &gt; instead of >
use &amp; instead of &
My question: Are there other things on the keyboard that we don't put directly from the keyboard?
Thanks a lot
robertmchicago is offline   Reply With Quote
Old 06-03-2025, 05:35 AM   #2
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,756
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by robertmchicago View Post
I am writing a reflowable epub 3. I have learned a lot, but I am still learning.
I know that we do this:
use &lt; instead of <
use &gt; instead of >
use &amp; instead of &
My question: Are there other things on the keyboard that we don't put directly from the keyboard?
Thanks a lot
If this ePub 3 is going to be for sale, make sure you make it as backwards compatible with ePub2 as you can.
JSWolf is offline   Reply With Quote
Advert
Old 06-03-2025, 08:19 AM   #3
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,351
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by robertmchicago View Post
I am writing a reflowable epub 3. I have learned a lot, but I am still learning.
I know that we do this:
use &lt; instead of <
use &gt; instead of >
use &amp; instead of &
My question: Are there other things on the keyboard that we don't put directly from the keyboard?
Thanks a lot
You really don’t need to worry about all those nitnoid details when you use the right tools.

I would actually recommend using an authoring program to write the book, or, at least, a word processor. Then use SaveAs to save as html format. Then you can import that html into an ePub editor like Sigil, or Calibre Editor, to do all the epubifying.
Turtle91 is offline   Reply With Quote
Old 06-03-2025, 10:12 AM   #4
Slevin#7
Connoisseur
Slevin#7 began at the beginning.
 
Posts: 61
Karma: 10
Join Date: May 2025
Device: iPad
Quote:
Originally Posted by robertmchicago View Post
My question: Are there other things on the keyboard that we don't put directly from the keyboard?
Thanks a lot
No, these three are the only ones, considered special characters, thus they have to be masked.

Since you are writing for EPUB3 you deal with XHTML5 and UTF-8, which means, you can safely use and should use all other characters directly for your main text. There are some exceptions when you wanna put special chars into tag-property values like for 'aria-label', but I would strongly encourage you to not use special chars in these values.

Also, as mentioned before, it will make life easier when you use a proper EPUB tool like Sigil (it's free), which can help you alot with all this tideous stuff.
Slevin#7 is online now   Reply With Quote
Old 06-03-2025, 01:30 PM   #5
robertmchicago
Enthusiast
robertmchicago began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Apr 2025
Device: none
Quote:
Originally Posted by JSWolf View Post
If this ePub 3 is going to be for sale, make sure you make it as backwards compatible with ePub2 as you can.
Yes, this epub 3 will be for sale, I will try backward compatibility if I can—thank you for the reminder.
robertmchicago is offline   Reply With Quote
Advert
Old 06-03-2025, 01:32 PM   #6
robertmchicago
Enthusiast
robertmchicago began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Apr 2025
Device: none
Quote:
Originally Posted by Turtle91 View Post
You really don’t need to worry about all those nitnoid details when you use the right tools.

I would actually recommend using an authoring program to write the book, or, at least, a word processor. Then use SaveAs to save as html format. Then you can import that html into an ePub editor like Sigil, or Calibre Editor, to do all the epubifying.
I am learning Sigil. I already have tried : Word - html filtered - Sigil, but it needed a lot of cleaning, so decided to use only Sigil.
robertmchicago is offline   Reply With Quote
Old 06-03-2025, 01:35 PM   #7
robertmchicago
Enthusiast
robertmchicago began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Apr 2025
Device: none
Quote:
Originally Posted by Slevin#7 View Post
No, these three are the only ones, considered special characters, thus they have to be masked.

Since you are writing for EPUB3 you deal with XHTML5 and UTF-8, which means, you can safely use and should use all other characters directly for your main text. There are some exceptions when you wanna put special chars into tag-property values like for 'aria-label', but I would strongly encourage you to not use special chars in these values.

Also, as mentioned before, it will make life easier when you use a proper EPUB tool like Sigil (it's free), which can help you alot with all this tideous stuff.
That really helps! I am already learning Sigil. I’ll remember not to use these in tag values.
But are you sure that keyboard keys like % * - _ = + ' " ; : don't need to be changed? For example we use these in tags too: = "
robertmchicago is offline   Reply With Quote
Old 06-03-2025, 02:08 PM   #8
Slevin#7
Connoisseur
Slevin#7 began at the beginning.
 
Posts: 61
Karma: 10
Join Date: May 2025
Device: iPad
Quote:
Originally Posted by robertmchicago View Post
But are you sure that keyboard keys like % * - _ = + ' " ; : don't need to be changed?"
Yes, I am sure. The parser won't catch them as functional characters, it will only seek for < and > which are part of HTML tags itself, and the & char which will get interpreted as the beginning of an unicode expression. So there is no need to worry. In fact, when coding for EPUB3 Sigil will swap your unicode or HTML entities with the actual chars, since this is the way to go.

Also, without additional information, the parser wouldn't even be able to assign the required chars when using HTML entities, since HTML5 doesn't require these additional informations anymore, thus having no assigning table in hand out of the box.
Slevin#7 is online now   Reply With Quote
Old 06-03-2025, 03:21 PM   #9
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,199
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Just to toss in my 5 cents worth, in an ePub3 files, you must use &amp;, &lt;, &gt;, &apos; and &quot; and not &, <, >, ' and ".
DNSB is online now   Reply With Quote
Old 06-03-2025, 03:40 PM   #10
Slevin#7
Connoisseur
Slevin#7 began at the beginning.
 
Posts: 61
Karma: 10
Join Date: May 2025
Device: iPad
Quote:
Originally Posted by DNSB View Post
Just to toss in my 5 cents worth, in an ePub3 files, you must use &amp;, &lt;, &gt;, &apos; and &quot; and not &, <, >, ' and ".
&apos; and &quot; are only required when used inside the tags, otherwise the parser will treat them as tag content and will not apply any special meaning to them.

The XML (XHTML) parser will go through the document char by char, it will recoginze a < as an opening sign of either an opening- or closing tag and will then change its mode to treat the following chars as part of the tag, until it hits the > char and will then know that the tag itself has ended. Within an openening and a closing tag, everything will be treated as tag-value or tag-content. The parser will then only seek for the next < char to find the next tag. XML (XHTML) is all about tags, there is no further special programming language involved in the meaning of Turing. The only other special sign which will be treated by the parser as functional is the &, since as mentioned before, it is the hook for the beginning of unicode codes (respectively HTML entities).
Slevin#7 is online now   Reply With Quote
Old 06-03-2025, 03:51 PM   #11
Slevin#7
Connoisseur
Slevin#7 began at the beginning.
 
Posts: 61
Karma: 10
Join Date: May 2025
Device: iPad
And to get a little more into detail: Your five codes are the only ones HTML5 knows by default, since the <, > and & are mainly relevant for the content itself and the other two ' and " have to be used inside the tags since the property-values must be wrapped within them (either ' or "). All other entities like &copy; and so on couldn't even get rendered since no assigning table is provided so far. You'd have to assign these codes manually to help the parser which unicode to use for them. This is one of the many benefits of XHTML5 and the required UTF-8 format.
Slevin#7 is online now   Reply With Quote
Old 06-03-2025, 06:25 PM   #12
Slevin#7
Connoisseur
Slevin#7 began at the beginning.
 
Posts: 61
Karma: 10
Join Date: May 2025
Device: iPad
My last 2 cents in addition: ' and " are only recognized by the parser as functional characters inside a tag.

When the parser parses a tag itself, the composition of a tag has to follow special rules. Chars like = assign a value to a property, where the property must be known to the parser and the value has to be wrapped inside ' or ". So The only other two chars which may have to be masked are these two quotes - in case you wanna put such a character into your value (and of course inside a tag value you have to mask the other special chars as well). Since when you put such a quote inside your value, the parser would interpret " or ' as the end of the value and this is not what you want.

Usually in HTML it is best practice to use " to wrap your values, which means, you could even use ' inside the value without the requirement of masking this char. The parser takes the opening quote " and only looks for the same quote to close the value. It works the other way around as well, opening with ' and using " inside the values. But as mentioned before, you should avoid all these special character inside your values at all, at least as far as you can. There may be some cases like metadata for titles where you have to put them into your values, but most of the time there is no need for that.
Slevin#7 is online now   Reply With Quote
Old 06-03-2025, 07:46 PM   #13
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,766
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by robertmchicago View Post
Yes, this epub 3 will be for sale, I will try backward compatibility if I can.
You can and you must (since your epub is for sale). And that is going to be a "funny" task (especially if you use advanced css3 properties to style your epub).
RbnJrg is online now   Reply With Quote
Old 06-03-2025, 11:56 PM   #14
robertmchicago
Enthusiast
robertmchicago began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Apr 2025
Device: none
Quote:
Originally Posted by Slevin#7 View Post
My last 2 cents in addition: ' and " are only recognized by the parser as functional characters inside a tag.

When the parser parses a tag itself, the composition of a tag has to follow
Thank you so much for all these clear explanations. Everything you said makes perfect sense. I really appreciate you sharing your knowledge. It’s helping me a lot and making things much easier for me. Thanks again!
robertmchicago is offline   Reply With Quote
Old 06-04-2025, 12:01 AM   #15
robertmchicago
Enthusiast
robertmchicago began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Apr 2025
Device: none
Quote:
Originally Posted by RbnJrg View Post
You can and you must (since your epub is for sale). And that is going to be a "funny" task (especially if you use advanced css3 properties to style your epub).
Thanks for the advice. My learning process depends on: Sigil, PageEdit, Sigil Guide (which is epub 3), PageEdit Guide (which is epub 2), w3schools.com, and this very helpful MobileRead forum. With all this, I’m sure I’ll soon be able to make my epub 3 files backward compatible with epub 2, for example, by using the NCX file and avoiding things that don’t work in EPUB 2. Thanks again for pointing me in the right direction.
robertmchicago is offline   Reply With Quote
Reply

Tags
epub 3, keyboard, keys, limitations, text


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
epub3 popup text with links fails same page fairbrothe ePub 2 01-24-2023 01:19 PM
Forma no svg text as the cover page image, epub3 lumpynose Kobo Reader 15 06-05-2019 11:56 AM
proper use and setting of text direction CSS vs structural in epub3 KevinH ePub 12 03-29-2018 10:55 AM
Looking for Japanese EPUB3 with vertical writing Micah General Discussions 4 06-15-2013 05:28 PM
Android App that translates freehand writing to text? silkmandarin enTourage Archive 4 05-12-2011 09:52 AM


All times are GMT -4. The time now is 06:30 PM.


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