![]() |
#1 |
Enthusiast
![]() 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 < instead of < use > instead of > use & instead of & My question: Are there other things on the keyboard that we don't put directly from the keyboard? Thanks a lot |
![]() |
![]() |
![]() |
#2 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
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. |
|
![]() |
![]() |
![]() |
#4 | |
Connoisseur
![]() Posts: 61
Karma: 10
Join Date: May 2025
Device: iPad
|
Quote:
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. |
|
![]() |
![]() |
![]() |
#5 |
Enthusiast
![]() Posts: 30
Karma: 10
Join Date: Apr 2025
Device: none
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Enthusiast
![]() Posts: 30
Karma: 10
Join Date: Apr 2025
Device: none
|
Quote:
|
|
![]() |
![]() |
![]() |
#7 | |
Enthusiast
![]() Posts: 30
Karma: 10
Join Date: Apr 2025
Device: none
|
Quote:
But are you sure that keyboard keys like % * - _ = + ' " ; : don't need to be changed? For example we use these in tags too: = " |
|
![]() |
![]() |
![]() |
#8 | |
Connoisseur
![]() Posts: 61
Karma: 10
Join Date: May 2025
Device: iPad
|
Quote:
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. |
|
![]() |
![]() |
![]() |
#9 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 &, <, >, ' and " and not &, <, >, ' and ".
|
![]() |
![]() |
![]() |
#10 | |
Connoisseur
![]() Posts: 61
Karma: 10
Join Date: May 2025
Device: iPad
|
Quote:
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). |
|
![]() |
![]() |
![]() |
#11 |
Connoisseur
![]() 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 © 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.
|
![]() |
![]() |
![]() |
#12 |
Connoisseur
![]() 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. |
![]() |
![]() |
![]() |
#13 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,766
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
|
![]() |
![]() |
![]() |
#14 |
Enthusiast
![]() Posts: 30
Karma: 10
Join Date: Apr 2025
Device: none
|
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!
|
![]() |
![]() |
![]() |
#15 |
Enthusiast
![]() Posts: 30
Karma: 10
Join Date: Apr 2025
Device: none
|
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.
|
![]() |
![]() |
![]() |
Tags |
epub 3, keyboard, keys, limitations, text |
|
![]() |
||||
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 |