Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 05-26-2024, 11:14 AM   #1
senhal
Connoisseur
senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.
 
senhal's Avatar
 
Posts: 82
Karma: 25684
Join Date: Sep 2014
Device: Kindle NT
Kepub issue on centered text

Hello everyone,
when converting from epub to kepub with Calibre, I notice that in many cases the text-align:center is lost.
For example, this is a picture of how the epub comes out, while this is a picture of the same epub converted to kepub.
This is the code:

Code:
<body>

  <p class="autore">Don Robertson</p>

  <p class="titolo">L’ultima stagione</p>

  <p class="sottotitolo"><i>Traduzione di Nicola Manuppelli</i></p>

  <p class="editore">Nutrimenti</p>

</body>
Code:
body {
  font-size: 100%;
  font-family: serif;
}
p {
  text-indent: 1.2em;
  text-align: justify;
  margin: 0;
  widows: 1;
  orphans: 1;
}
.autore {
  font-size: 1em;
  margin-top: 2.4em;
  text-indent: 0;
  text-align: center;
}
.titolo {
  font-size: 2em;
  margin-top: 1.2em;
  text-indent: 0;
  text-align: center;
}
.sottotitolo {
  font-size: 0.85em;
  margin-top: 1em;
  font-style: italic;
  text-indent: 0;
  text-align: center;
}
.editore {
  font-size: 1em;
  margin-top: 7em;
  text-indent: 0;
  text-align: center;
}
Can anyone explain to me how to solve it?
Thank you
senhal is offline   Reply With Quote
Old 05-26-2024, 03:06 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: 74,681
Karma: 130140792
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 senhal View Post
Hello everyone,
when converting from epub to kepub with Calibre, I notice that in many cases the text-align:center is lost.
For example, this is a picture of how the epub comes out, while this is a picture of the same epub converted to kepub.
This is the code:

Code:
<body>

  <p class="autore">Don Robertson</p>

  <p class="titolo">L’ultima stagione</p>

  <p class="sottotitolo"><i>Traduzione di Nicola Manuppelli</i></p>

  <p class="editore">Nutrimenti</p>

</body>
Code:
body {
  font-size: 100%;
  font-family: serif;
}
p {
  text-indent: 1.2em;
  text-align: justify;
  margin: 0;
  widows: 1;
  orphans: 1;
}
.autore {
  font-size: 1em;
  margin-top: 2.4em;
  text-indent: 0;
  text-align: center;
}
.titolo {
  font-size: 2em;
  margin-top: 1.2em;
  text-indent: 0;
  text-align: center;
}
.sottotitolo {
  font-size: 0.85em;
  margin-top: 1em;
  font-style: italic;
  text-indent: 0;
  text-align: center;
}
.editore {
  font-size: 1em;
  margin-top: 7em;
  text-indent: 0;
  text-align: center;
}
Can anyone explain to me how to solve it?
Thank you
That's an easy fix. Go to the Aa menu and turn justification off. If you have justification set in the Aa menu,you lose center. So if you want left justify and the eBook is set to full justify, the way to fix it is to edit the CSS in the ePub to make it left justify. Same thing if the ePub is left justified and you want full justify.
JSWolf is offline   Reply With Quote
Old 06-03-2024, 01:23 PM   #3
senhal
Connoisseur
senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.
 
senhal's Avatar
 
Posts: 82
Karma: 25684
Join Date: Sep 2014
Device: Kindle NT
Quote:
Originally Posted by JSWolf View Post
That's an easy fix. Go to the Aa menu and turn justification off. If you have justification set in the Aa menu,you lose center. So if you want left justify and the eBook is set to full justify, the way to fix it is to edit the CSS in the ePub to make it left justify. Same thing if the ePub is left justified and you want full justify.
Wow, thanks, it worked!
senhal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Clara 2E No centered text, kepub ebook. Jane Eyre Kobo Reader 26 03-22-2024 03:36 PM
centered text having a specific width Vroni ePub 18 08-07-2019 05:23 AM
Conversion ePub -> azw3, text centered apeiron75 Calibre 0 05-18-2013 12:28 PM
.epub hyperlinks, centered and non indented text. Xabache ePub 2 09-13-2010 01:11 PM
Centered and right aligned text for Stanza on iPhone Arjen ePub 6 06-17-2010 12:19 PM


All times are GMT -4. The time now is 09:38 AM.


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