|
|
#1 |
|
Member
![]() Posts: 10
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; 07-22-2025 at 02:22 PM. |
|
|
|
|
|
#2 | |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 80,789
Karma: 150249619
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? |
|
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Member
![]() Posts: 10
Karma: 10
Join Date: Jul 2025
Device: none / pc
|
|
|
|
|
|
|
#4 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,703
Karma: 79983758
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 |
|
Member
![]() Posts: 10
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 |
|
|
|
| Advert | |
|
|
|
|
#6 | |
|
Member
![]() Posts: 10
Karma: 10
Join Date: Jul 2025
Device: none / pc
|
Quote:
PHP Code:
|
|
|
|
|
|
|
#7 |
|
Member
![]() Posts: 10
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 |
|
Member
![]() Posts: 10
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,270
Karma: 61916422
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: 15,011
Karma: 111111255
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; 07-22-2025 at 05:47 PM. |
|
|
|
|
|
#11 |
|
Member
![]() Posts: 10
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 |
|
Member
![]() Posts: 10
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: 15,011
Karma: 111111255
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: 15,011
Karma: 111111255
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Oh, and letter spacing mostly won't work.
|
|
|
|
|
|
#15 |
|
Member
![]() Posts: 10
Karma: 10
Join Date: Jul 2025
Device: none / pc
|
Thanks for the help. Interestingly enough when I watch the page in the editor it looks normal it's when I use the eBook viewer the book looks weird in the text blocks
https://imgur.com/a/sj4EosI |
|
|
|
![]() |
|
Similar Threads
|
||||
| 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 12:17 PM |
| Forma In some articles or books, the first or last line is half-cut. | droopy | Kobo Reader | 6 | 05-05-2020 03:17 PM |
| Double Energy, Cut Sleep in Half (Free for 3 days!) | maximadam | Self-Promotions by Authors and Publishers | 0 | 05-28-2016 08:49 AM |
| Touch Bottom line of page cut in half since 1.9.10? | NineOne | Kobo Reader | 7 | 09-20-2011 06:01 PM |
| Epub on Ipad: pictures cut in half | georg3200 | Apple Devices | 3 | 07-19-2010 05:33 AM |