03-17-2022, 07:12 PM | #1 |
Wizard
Posts: 1,089
Karma: 4911876
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Quotes and blockquote
I recently discovered that font-variant: small-caps; does not work in epubs used in Kobo Libra2
Now I have also noticed that quotes are a bit temperamental. For example, when a character reads a printed document verbatim, it is usually displayed with wider margins, and maybe italicized. I tried replicating this with the following using <p class="quote"></p> Spoiler:
But the Libra2 completely ignored that and the quoted text just looked like the rest of the page. The Libra2 expects <blockquote></blockquote>, then it displayed as quoted text. |
03-17-2022, 07:47 PM | #2 | |
Grand Sorcerer
Posts: 6,208
Karma: 16534692
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
Code:
margin-left: 2em; margin-right: 2em; I think a <blockquote> has default increased left/right margins even if you don't include any explicit CSS for it. |
|
Advert | |
|
03-17-2022, 07:59 PM | #3 |
Wizard
Posts: 1,089
Karma: 4911876
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Hi @jackie_w
Thanks for your feedback. I will try that change when I get back home later this afternoon. But I suppose I should use <blockquote> anyway as that is what it is designed for. I can modify it in the css page also. |
03-17-2022, 08:19 PM | #4 | |
Grand Sorcerer
Posts: 6,208
Karma: 16534692
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
Code:
<blockquote> <p>Some text</p> <p>Some more text</p> </blockquote> |
|
03-17-2022, 09:04 PM | #5 | |
Wizard
Posts: 1,089
Karma: 4911876
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Quote:
Apart from epubcheck noting it as an error, is it a requirement to use child tags for blockquote elements? That something written in the css specs and ereaders expect it? |
|
Advert | |
|
03-17-2022, 09:27 PM | #6 |
Grand Sorcerer
Posts: 6,208
Karma: 16534692
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
I don't think ereaders will complain. It's just epubcheck's nitpicking. More important if you're creating ebooks to sell. Not so much if you're just creating them for yourself.
|
03-17-2022, 10:35 PM | #7 |
Running with scissors
Posts: 1,552
Karma: 14325282
Join Date: Nov 2019
Device: none
|
I didn't get an error from epubcheck when I made a block quote with no p tags in it.
Also, this page says they're not always needed; see the bottom paragraph: https://www.w3.org/TR/2011/WD-html5-...e-element.html |
03-17-2022, 10:39 PM | #8 |
Running with scissors
Posts: 1,552
Karma: 14325282
Join Date: Nov 2019
Device: none
|
For the sake of showing another way of styling blockquote, I use a width percentage:
Code:
blockquote, div.block { margin-left: auto; margin-right: auto; margin-top: 1em; width: 85%; } blockquote p, div.block p { margin-top: 0.25em; text-indent: 0em; } blockquote + p, div.block + p { margin-top: 1em; } Last edited by hobnail; 03-17-2022 at 10:42 PM. |
03-18-2022, 10:16 AM | #9 |
A Hairy Wizard
Posts: 3,093
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
I've always used blockquote when it is a longer quote...typically two or more paragraphs. I think that is why people are used to using the <p> tags inside of a blockquote. If it was a single paragraph then it's easier to just style the individual paragraph:
Code:
p.quote {margin:1em; text-indent:0; text-align:left; font-size:.8em; font-style:italic} <p>This is a normal paragraph before the quote.</p> <p class="quote">Yadda yadda yadda...</p> <p>This is a normal paragraph after the quote.</p> vs. blockquote {margin:1em auto; width:50%} blockquote p {margin:0 0 .75em; text-align:left; text-indent:0; font-size:.8em; font-style:italic} blockquote p.auth {margin:1.5em 0 0; text-align:right; font-style:normal} blockquote + p {text-indent:0} <p>This is a normal paragraph before the blockquote.</p> <blockquote> <p>Yadda yadda yadda...</p> <p>Also, yadda yadda yadda...</p> <p>But then, yadda yadda yadda...</p> <p>Finally, yadda yadda yadda...</p> <p class="auth">- Dion, circa 2022,<br />post pandemic</p> </blockquote> <p>This is a normal paragraph after the blockquote.</p> I only use classes when there is something different about that particular thing...otherwise I simply define the base tag...that keeps the code view nice and clean, reducing bloat. It drives me nuts when I see things like this on every paragraph: <p style="margin:0.00% 0.00%; text-indent:1.2em; text-align:justify; widows:0; orphans:0"> <span style=" font-size:1.0rem">Hello.</span> </p> when it could be just: p {margin:0; text-indent:1.2em} <p>Hello.</p> |
03-18-2022, 10:31 AM | #10 | |
A Hairy Wizard
Posts: 3,093
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
Does the Libra2 have an option to use the "Publisher's styling" or something similar ?? |
|
03-18-2022, 11:07 AM | #11 |
Grand Sorcerer
Posts: 5,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
|
03-18-2022, 12:34 PM | #12 | |
Grand Sorcerer
Posts: 6,208
Karma: 16534692
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
Calibre's Check Book utility doesn't show an error for either EPUB2 or EPUB3. To the best of my knowledge, calibre tries to pay more attention to flagging errors that may cause actual problems in actual ereader apps than whether the (over-fussy???) rules of epubcheck are strictly followed. |
|
03-18-2022, 03:29 PM | #13 | |
Resident Curmudgeon
Posts: 73,897
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Code:
blockquote { margin-top: 1em; margin-right: 1.5em; margin-bottom: 1em; margin-left: 1.5em; } Code:
.blockquote { margin-top: 1em; margin-right: 1.5em; margin-bottom: 0; margin-left: 1.5em; } Code:
<blockquote class="blockquote"> <p>"This is at the end of the chapter"</p> </blockquote> Last edited by JSWolf; 03-23-2022 at 11:11 AM. |
|
03-18-2022, 03:32 PM | #14 | |
Bookmaker & Cat Slave
Posts: 11,460
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
♪ Hello blockquotes my old friends, I've come to use you once again...♫ Dang, I love blockquotes and I remember when we used to stack 'em, for old MOBI (KF7) format, to try to create any sort of indent, lol. One for the first-level indent, stacked for the 2nd... Yeah, yeah, I know, this is the ePUB forum, but...just a quick trip down memory lane. Oh, right the actual question--we slap paragraph tags around them inside the blockquote for safety (fallback, etc.). We figure, it doesn't hurt. FWIW. Hitch |
|
03-18-2022, 03:35 PM | #15 |
Resident Curmudgeon
Posts: 73,897
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
change British quotes to American quotes | lumpynose | Sigil | 3 | 08-28-2019 12:20 PM |
Quotes/smart quotes in S&R | MerlinMama | Editor | 7 | 07-19-2016 11:00 PM |
How to convert straight quotes to smart 'curly' typographer's quotes | bookman156 | ePub | 52 | 06-20-2016 03:09 PM |
Change single quotes to double quotes | Elfwreck | Workshop | 16 | 04-26-2013 10:06 AM |
convert straight quotes to curly quotes | alansplace | Calibre | 3 | 09-25-2010 03:51 PM |