Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 04-12-2022, 12:43 PM   #1
provlima
Junior Member
provlima began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Feb 2022
Device: kindle
odt to epub conversion why are images not centered?

I have converted an ODT text manuscript with images to an epub file
When viewed on Kindle Previewer 3 the images appear left indented not centered as they appeared in the original manuscript.

Is it possible to have them viewed in the center of the space between two paragraphs when converted to epub file?
provlima is offline   Reply With Quote
Old 04-12-2022, 12:55 PM   #2
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,091
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Don't

Edit in in odt format but do an extra Save As in docx. Then convert docx. No problem with centred images.

Use of paragraph styles is important and images work in more ereaders if in their own paragraph anchored as character, with appropriate text paragraph style and graphics style.

Only ever open a doc or docx from Word, to convert. Never open the extra docx saved from LO Writer. Only edit the odt.

Use Calibre & "tablet" page format for conversion.
Quoth is offline   Reply With Quote
Advert
Old 04-12-2022, 12:58 PM   #3
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
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
A text file doesn’t really have any formatting, or ‘styling’, information. In an ePub you need to provide the styling using a style sheet. CSS (cascading style sheet) contains all the styling information for your book which makes it all pretty when you link it to the html files.

Your code should look something like this:

<p>This is a normal paragraph.</p>
<p>This is a normal paragraph.</p>
<div class=“image”><img alt=“” src=“../Images/touring.jpg”/></div>
<p>This is a normal paragraph.</p>
<p>This is a normal paragraph.</p>

With a styles.css something like this:

p {margin:0; text-indent:1.2em; text-align:left}
div.image {margin:2em auto; width:50%}
Turtle91 is offline   Reply With Quote
Old 04-13-2022, 06:07 AM   #4
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,091
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
The odt format isn't a text format.

There is no need to edit the CSS & HTML. If a properly styled & formatted odt has an extra "Save As" in docx and that is converted in Calibre the epub CSS & HTML are perfect.
Quoth is offline   Reply With Quote
Old 04-15-2022, 04:08 AM   #5
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
Quote:
"I have converted an ODT text manuscript with images to an epub file
When viewed on Kindle Previewer 3 the images appear left indented not centered as they appeared in the original manuscript."
There are two ways to fix that problem. For the first way, just export your ODT doc to Word doc format and then convert the Word doc to epub format. In epub format you could then write a simple style for the CSS in Sigil like this:

p.center {
text-align: center;
}

Use the above style within HTML images like this:

Code:
<p class='center'>
    <img alt="img01" src="../Images/Title_Image.jpg">
</p>
The second way to quickly center each of your epub images in Sigil would be to click and highlight each image in the Sigil html editor in turn and then just click the 'Align Text Center' button in the Sigil Toolbar.

Last edited by slowsmile; 04-15-2022 at 04:12 AM.
slowsmile is offline   Reply With Quote
Advert
Old 04-15-2022, 06:28 AM   #6
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,091
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
No, doc is poor, export (Save As) an extra copy as docx

It's also easier to convert docx to epub in Calibre. Sigil is better for experts handcrafting an ebook. It's not needed for this and the styles, formatting & centring should always be done in the wordprocessor, not in Sigil or Calibre, unless you only have an ebook and no wordprocessor source,

Properly done styles editing an odt with an extra docx "Save As" will automatically create that sort of HTML and CSS.
Quoth is offline   Reply With Quote
Old 04-15-2022, 11:44 AM   #7
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: 73,896
Karma: 128597114
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 slowsmile View Post
There are two ways to fix that problem. For the first way, just export your ODT doc to Word doc format and then convert the Word doc to epub format. In epub format you could then write a simple style for the CSS in Sigil like this:

p.center {
text-align: center;
}

Use the above style within HTML images like this:

Code:
<p class='center'>
    <img alt="img01" src="../Images/Title_Image.jpg">
</p>
The second way to quickly center each of your epub images in Sigil would be to click and highlight each image in the Sigil html editor in turn and then just click the 'Align Text Center' button in the Sigil Toolbar.
You left out the indent. I had to remove the p as I cannot stand p. CSS styles. You need the indent to be 0 because p should be the default for most paragraphs and that includes the indent.

Code:
p {
  margin-top: 0;
  margin-bottom: 0;
  text-indent: 1.2em;
}
.center  {
  text-align: center;
  text-indent: 0;
}

Last edited by JSWolf; 04-15-2022 at 11:57 AM.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
odt to epub conversion why are images not centered? provlima Sigil 3 04-12-2022 03:34 PM
Image Conversion from .odt to .epub Huskey Conversion 3 08-04-2021 07:26 PM
convert ODT with multiples svg to epub double the images reup Conversion 8 01-27-2016 03:39 AM
Conversion ePub -> azw3, text centered apeiron75 Calibre 0 05-18-2013 12:28 PM
Centered lines and conversion to epub starrigger Conversion 46 09-07-2012 11:18 PM


All times are GMT -4. The time now is 12:11 PM.


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