![]() |
#1 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Jul 2025
Device: none / pc
|
![]()
Used the De acsm plugin to get rid of the Drm. So I got a Epub file But some of the text in the book looks like this image. Not sure why it looks like that. If it's the book that is like that or if it somehow is a setting in calibre. Have tried to convert to pdf but it looks the same.
https://imgur.com/M9pJaUZ Last edited by kust; Today at 01:22 PM. |
![]() |
![]() |
![]() |
#2 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,763
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
What is this eBook? |
|
![]() |
![]() |
![]() |
#3 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Jul 2025
Device: none / pc
|
|
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,530
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
What would be far more useful than just a screen print would be
|
![]() |
![]() |
![]() |
#5 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Jul 2025
Device: none / pc
|
Code Css and book name
C++ How to Program, Global Edition
Eleventh Edition Paul Deitel and Harvey Deitel Code and CSS https://imgur.com/a/usOGACg https://imgur.com/a/D8FyHO8 |
![]() |
![]() |
![]() |
#6 | |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Jul 2025
Device: none / pc
|
Quote:
PHP Code:
|
|
![]() |
![]() |
![]() |
#7 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Jul 2025
Device: none / pc
|
Code:
Fig. 6.7 | Die-rolling program using an array instead of switch. // fig06_07.cpp // Die-rolling program using an array instead of switch. #include <format> #include <iostream> #include <array> #include <random> int main() { // set up random-number generation std::random_device rd; // used to seed the default_random_engine std::default_random_engine engine{rd()}; // rd() produces a seed std::uniform_int_distribution randomDie{1, 6}; constexpr size_t arraySize{7}; // ignore element zero std::array<int, arraySize> frequency{}; // initialize to 0s // roll die 60,000,000 times; use die value as frequency index for (int roll{1}; roll <= 60'000'000; ++roll) { ++frequency.at(randomDie(engine)); } std::cout << std::format("{}{:>13}\n", "Face", "Frequency"); // output each array element for (size_t face{1}; face < frequency.size(); ++face) { std::cout << std::format("{:>4}{:>13}\n", face, frequency.at(face)); } } |
![]() |
![]() |
![]() |
#8 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Jul 2025
Device: none / pc
|
I think this is what you meant by CSS
PHP Code:
|
![]() |
![]() |
![]() |
#9 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,064
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
|
|
![]() |
![]() |
![]() |
#10 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,056
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Css will have the definitions of class="computerLine"
something like Code:
computerline { margin-left: 4.0em; margin-top: 0; text-align: left; } heading4CodeSnippetTitle { //more stuff } EDIT That does though look like horrid HTML Last edited by Quoth; Today at 04:47 PM. |
![]() |
![]() |
![]() |
#11 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Jul 2025
Device: none / pc
|
Sorry I think I found the CSS
This is the gray Headline thingy Code:
/* image caption text */ figcaption.figcaptionCodeSnippet { color: #505759; font-family: 'Open Sans', Helvetica, sans-serif; max-width: 680px; margin: 0.75em auto 0.45em auto; padding: 0; font-size: 0.90em; font-weight: 400; line-height: 1.5em; letter-spacing: 0.02em; word-wrap: break-word; } Code:
.codeSnippet[data-startNumber] pre, .codeNoHighlight[data-startNumber] pre { counter-reset: line; border-left: 1px solid #ddd; background: transparent!important; margin-left:4em; overflow: visible !important; position: relative; } |
![]() |
![]() |
![]() |
#12 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Jul 2025
Device: none / pc
|
Found this one aswell I think the code block is called pre
Code:
div.divCodeSnippetFigure pre span.computerLine, div.divCodeSnippetFigure pre span.codeNoHighlightLine, div.codeNoHighlight pre span.computerLine, div.codeNoHighlight pre span.codeNoHighlightLine { display:block; } .codeSnippet[data-startNumber] pre, .codeNoHighlight[data-startNumber] pre { counter-reset: line; border-left: 1px solid #ddd; background: transparent!important; margin-left:4em; overflow: visible !important; position: relative; } |
![]() |
![]() |
![]() |
#13 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,056
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
I use the CSS edit feature of Calibre conversions to completely delete line-height as that should only be done, if at all, on web sites. The font metrics set relative line heights correctly.
you can add margin-bottom: 0.5em; to figure text etc to increase spacing. I'm suspicious of the position: relative; https://www.w3schools.com/Css/css_positioning.asp I never see the position property in any ebooks I've ever edited or created, but I never ever have fixed layout (epub3) ebooks. However I've never seen the counter-reset property either https://www.w3schools.com/cssref/pr_...nter-reset.php Note: epub uses HTML5 and CSS3, but only a subset. Not everything that works on a webpage works in an ebook. The Calibre viewer is actually more "forgiving" than actual ereaders, so if it's bad on the Calibre viewer it's bad! The W3C is a useful reference as long as you understand it's less true for ebooks. |
![]() |
![]() |
![]() |
#14 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,056
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Oh, and letter spacing mostly won't work.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Epub to PDF Issue: text lines cut in half (Chinese font vertical-rl script) | ignosticism | Conversion | 4 | 01-28-2021 11:17 AM |
Forma In some articles or books, the first or last line is half-cut. | droopy | Kobo Reader | 6 | 05-05-2020 02:17 PM |
Double Energy, Cut Sleep in Half (Free for 3 days!) | maximadam | Self-Promotions by Authors and Publishers | 0 | 05-28-2016 07:49 AM |
Touch Bottom line of page cut in half since 1.9.10? | NineOne | Kobo Reader | 7 | 09-20-2011 05:01 PM |
Epub on Ipad: pictures cut in half | georg3200 | Apple Devices | 3 | 07-19-2010 04:33 AM |