Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Viewer

Notices

Reply
 
Thread Tools Search this Thread
Old Yesterday, 04:15 PM   #1
dan2the6th
Connoisseur
dan2the6th began at the beginning.
 
Posts: 53
Karma: 10
Join Date: Mar 2014
Device: iPhone XR
Line numbers mutilated

I have a copy of The Iliad, translated by Richmond Lattimore. EPUB format. The text is in verse, and there are line numbers every five lines, as is somewhat common in works like this. The trouble is that once the line numbers reach three digits, they get cut off at the left margin. I've uploaded a screen shot. Those numbers are supposed to be 135, 140, 145, etc. Is there any way I can make this work, or is this book just poorly formatted? Thanks.
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2024-07-23 150937.png
Views:	47
Size:	206.0 KB
ID:	209732  
dan2the6th is offline   Reply With Quote
Old Yesterday, 08:41 PM   #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: 75,046
Karma: 131375774
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 dan2the6th View Post
I have a copy of The Iliad, translated by Richmond Lattimore. EPUB format. The text is in verse, and there are line numbers every five lines, as is somewhat common in works like this. The trouble is that once the line numbers reach three digits, they get cut off at the left margin. I've uploaded a screen shot. Those numbers are supposed to be 135, 140, 145, etc. Is there any way I can make this work, or is this book just poorly formatted? Thanks.
It's very poorly formatted. The problem is that you cannot do line numbers line that and not have line breaks in the middle of the paragraph. Also, depending on the text size, the line numbers could be off. So just edit the book to dump the line numbers as they cannot work properly and still be properly formatted. If I needed a large enough font size, the line numbers would be incorrect.
JSWolf is offline   Reply With Quote
Old Yesterday, 08:44 PM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,145
Karma: 22670164
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You can probably tweak the CSS of the book to fix it, but cant say how without seeing the actual book.
kovidgoyal is offline   Reply With Quote
Old Yesterday, 08:57 PM   #4
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: 75,046
Karma: 131375774
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 kovidgoyal View Post
You can probably tweak the CSS of the book to fix it, but cant say how without seeing the actual book.
I cannot see a way to fix it as the line numbers that do not start at the beginning of a paragraph will need to have lines split. That and large enough text will cause the line numbers to be wrong.
JSWolf is offline   Reply With Quote
Old Yesterday, 09:56 PM   #5
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,105
Karma: 57259780
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
You might try making the line number font-size smaller (~85%)
You may need to wrap them in a span, with appropriate CSS callout
theducks is online now   Reply With Quote
Old Today, 05:48 AM   #6
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: 75,046
Karma: 131375774
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 theducks View Post
You might try making the line number font-size smaller (~85%)
You may need to wrap them in a span, with appropriate CSS callout
Do you see this actually working correctly?
JSWolf is offline   Reply With Quote
Old Today, 11:08 AM   #7
dan2the6th
Connoisseur
dan2the6th began at the beginning.
 
Posts: 53
Karma: 10
Join Date: Mar 2014
Device: iPhone XR
I thought of just removing the line numbers, since I don't really care about them, but it looks like it would be one-at-a-time tedious work.

I tried tinkering with the CSS (at which I am NOT an expert) and I kept introducing other problems, so I gave up on that approach.
dan2the6th is offline   Reply With Quote
Old Today, 01:00 PM   #8
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,105
Karma: 57259780
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by JSWolf View Post
Do you see this actually working correctly?
Why not. I don't have a sample of the file to play with.
I am assuming this is just a case of running out of space for the hanging indent.

Years ago, I made my Body font 1.2em and a margin-right:16pt to give room for 3 digits of ADE # on my EZReader
theducks is online now   Reply With Quote
Old Today, 01:05 PM   #9
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,105
Karma: 57259780
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by dan2the6th View Post
I thought of just removing the line numbers, since I don't really care about them, but it looks like it would be one-at-a-time tedious work.

I tried tinkering with the CSS (at which I am NOT an expert) and I kept introducing other problems, so I gave up on that approach.
Regex might work to find the numbers (I assumed the start with a period and end with a space)

Code:
\.\d+\s
But you probably want to then kill the outdent. for that you need to adjust the CSS for that paragraphs class (Hint: paste that part of the CSS and we can suggest)
theducks is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Duplicate ID Error line numbers wrong phossler Editor 7 05-10-2019 09:05 PM
Poetry: line numbers aligned to the right. 1v4n0 ePub 20 12-16-2017 04:02 AM
Shakespeare Collection for Kindle with line numbers SamTCat Amazon Kindle 0 08-19-2011 11:36 PM
Adding line numbers to an ebook txgecko Workshop 8 06-11-2011 02:59 PM
Formatting epic poems with line numbers? Lima_dat Workshop 4 02-25-2008 03:53 PM


All times are GMT -4. The time now is 03:16 PM.


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