Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 08-12-2018, 10:17 PM   #1
yaakwilson
Junior Member
yaakwilson began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Aug 2018
Device: iPad
Hello with Conversion Problem

very happy using Calibre as my editor - but a novice who doesn't use any of the coding features. Anhow:

converting .epub (default input page setup) to .epub (iPad output page setup) does a great job rescaling images (there are lots in this 40MB book) but the CSS parse routine seems to ignore and remove many rules that are used to vary the text indent. e.g.

.ltr8indent {
border-bottom: 0;
border-bottom-color: currentColor;
border-bottom-style: none;
border-bottom-width: 0;
border-top: 0;
border-top-color: currentColor;
border-top-style: none;
border-top-width: 0;
display: block;
font-family: serif;
font-size: 1em;
font-style: italic;
font-weight: normal;
line-height: 1.2;
margin-bottom: 0;
margin-left: 24px;
margin-right: 0;
margin-top: 0;
orphans: 2;
padding-bottom: 0;
padding-top: 0;
text-align: justify;
text-indent: 1.5em;
widows: 2
}

has a value text-indent: 8em; in the original - and there are other rules .ltr5indent, .ltr10indent, etc. that were just dropped and replaced with the above after CSS parsing. I wanted to provide "custom" .epub versions based on the device but it's frustrating to think I have to edit every conversion to restore the CSS rules and their effect.

The conversion log shows no errors.

Didn't attempt to attach the two files - original is 40MB - the iPad output file is 10MB .

Any suggestions appreciated. Thx although you may regret allowing me to join
yaakwilson is offline   Reply With Quote
Old 08-13-2018, 07:16 AM   #2
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: 43,778
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Conversion does not preserve CSS rules it does a process called CSS flattening, however the end result should be visually identical or at least very close. If you have some book where that is not the case, create a small extract from it demonstrating the problem and post it.
kovidgoyal is offline   Reply With Quote
Old 08-13-2018, 08:12 PM   #3
yaakwilson
Junior Member
yaakwilson began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Aug 2018
Device: iPad
Conversion Problem

Original file: OriginalChunk.epub
Converted file: iPadConversion.epub

In iPadConversion.epub content0004.xhtml and content0006.xhtml files show that the tags in the OriginalChunk.epub file:
<p class="ltr1indent">
<p class="ltr3indent">
<p class="ltr4indent">
<p class="ltr5indent">
<p class="ltr6indent">
<p class="ltr8indent">
<p class="ltr9indent">
<p class="ltr12indent">
were all replaced with the tag:
<p class="ltr0indent">
Those OriginalChunk.epub do not appear in the iPadConversion.epub stylesheet.css file.

Further, the conversion always seems to automatically add calibre1, calibre2, calibre3, calibre4, calibre5, calibre6 rules to the stylesheet.css file as well.

The attached files include the images of letters and their transcription to illustrate my intention to format the transcription as close to the image as possible. Hence those numerous class attributes in the OriginalChunk.epub file.

I have attached the before/after files and a text file of the conversion log.

Any suggestions to help me avoid having to edit every file conversion to maintain the original format will be appreciated.
Thx,
Bill
Attached Files
File Type: epub OriginalChunk.epub (4.33 MB, 90 views)
File Type: epub iPadConversion.epub (1.10 MB, 95 views)
File Type: txt log.txt (7.3 KB, 84 views)
yaakwilson is offline   Reply With Quote
Old 08-13-2018, 09:33 PM   #4
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: 43,778
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I'm not seeing any visual discrepancies between your two files. Both files have a text indent of 1.5em in content0006.xhtml

As i said before, conversion does not preserve CSS, only visual appearance. Conversion also rescales font sizes by default based on the output profile you select. You can disable that in the Look & Feel section of the conversion dialog. https://manual.calibre-ebook.com/conversion.html#fonts
kovidgoyal is offline   Reply With Quote
Old 08-13-2018, 09:42 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: 29,689
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Those classes did not seem to appear in the ORIGchunk

Conversion flattens styles and assigns calibre# codes
That is the way it works. Live with it or don't convert with Calibre

Cleanup (modifyEPUB and Polish), can condense identical (content) styles, which is what you may be seeing (you can disable that feature in there respective settings)
theducks is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What`s the problem ?? Conversion ... Wipneus Conversion 7 07-17-2015 06:14 PM
Conversion problem adrian142 Conversion 1 07-07-2015 09:30 AM
Problem with my first conversion ArnieG Conversion 2 06-05-2013 09:37 AM
Conversion Problem Mishri Jain Conversion 14 04-29-2011 10:28 PM
Conversion Problem tonyt Calibre 5 06-13-2009 05:04 PM


All times are GMT -4. The time now is 07:13 AM.


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