Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 07-15-2010, 10:07 AM   #721
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,889
Karma: 59840450
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 Katdragon View Post
Thanks so much I'll try this after Masterchef!
nrapallo has more like what I had in mind.
I would have simply replaced (use regex)
Code:
#
  <div class="calibre10"> M
  </div>
 
  <p>
with

Code:
#
  <p class="calibre10">
    M
Basically, I moved the P to the front.
theducks is offline   Reply With Quote
Old 07-15-2010, 10:26 AM   #722
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by theducks View Post
Basically, I moved the P to the front.
That's fine, but it will eliminate the initial letter "treatment" via class="calibre10" and apply it to the whole paragraph instead.

What you should really do is replace it instead with:
Code:
#
  <p><span class="calibre10">
    M</span>
nrapallo is offline   Reply With Quote
Old 07-15-2010, 10:44 AM   #723
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,889
Karma: 59840450
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 nrapallo View Post
That's fine, but it will eliminate the initial letter "treatment" via class="calibre10" and apply it to the whole paragraph instead.

What you should really do is replace it instead with:
Code:
#
  <p><span class="calibre10">
    M</span>
That is the desired effect
Every current paragraph starts with that treatment. Katdragon wants it gone


Normally, that type of treatment is used only at Chapter starts or possibly, scene breaks.
I made an assumption about the calibre10 that I should not have. (the problem with working with code fragments. No complete picture )
What size or face different from default?
theducks is offline   Reply With Quote
Old 07-16-2010, 03:14 AM   #724
LARdT
The LARdT of E-Books
LARdT began at the beginning.
 
LARdT's Avatar
 
Posts: 106
Karma: 46
Join Date: Dec 2009
Device: HANLIN V3ext (Papyre 6.1)
IF you have
Code:
<div class="calibre10">
   M
 </div>

 <p>y jailers merely tightened their hold and frog-marched me when I wobbled. Suckers are very strong; they may not have noticed that they were now bearing nearly all my weight as my knees gave and my feet lost their purchase on the ragged ground.</p>
and you want to end with something like:

Code:
<div class="calibre10">
   <p>My jailers merely tightened their hold and frog-marched me when I wobbled. Suckers are very strong; they may not have noticed that they were now bearing nearly all my weight as my knees gave and my feet lost their purchase on the ragged ground.</p>
<div>
Your SEARCH string is:
Code:
<div class="calibre10">(\n\s*)([([\(\ÑñÓ/ÃÁÉÍÚáéíóúÜü¡!?¿*:«»"'-%…=–º©—“”#{(¼)\).,;a-zA-Z0-9\-_\s\c]*)(\n\s*)</div>(\n\s*)<p>([\(\ÑñÓ/ÃÁÉÍÚáéíóúÜü¡!?¿*:«»"'-%…=–º©—“”#{(¼)\).,;a-zA-Z0-9\-_\s\c\<\>\[\]\n]*)</p>
and replace string is: (you may copy the carriage returns inside SIGIL replace box)

Code:
<div class="calibre10">
   </p>\5</p>
<div>
You have plenty examples of RegEx and explanations about them in

http://mipapyreebookreader.blogspot....ch/label/RegEx
LARdT is offline   Reply With Quote
Old 07-16-2010, 03:00 PM   #725
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by theducks View Post
That is the desired effect
Every current paragraph starts with that treatment. Katdragon wants it gone
Yes, if you wanted it GONE then just delete the class="calibre10" (as you've indicated below). But if you can get it to work PROPERLY, why not leave in that treatment...

Quote:
Normally, that type of treatment is used only at Chapter starts or possibly, scene breaks.
I made an assumption about the calibre10 that I should not have. (the problem with working with code fragments. No complete picture )
What size or face different from default?
That's right, just replace with <p> instead of <p class="calibre10">
nrapallo is offline   Reply With Quote
Old 07-17-2010, 05:24 AM   #726
Katdragon
Connoisseur
Katdragon began at the beginning.
 
Posts: 98
Karma: 40
Join Date: May 2010
Device: Kobo (currently out of commission), Kindle 3
Hey guys,
I tried searching for:
Code:
 <div class="calibre10">(\n\s*)([([\(\ÑñÓ/ÃÁÉÍÚáéíóúÜü¡!?¿*:«»"'-%…=–º©—“”#{(¼)\).,;a-zA-Z0-9\-_\s\c]*)(\n\s*)</div>(\n\s*)<p>([\(\ÑñÓ/ÃÁÉÍÚáéíóúÜü¡!?¿*:«»"'-%…=–º©—“”#{(¼)\).,;a-zA-Z0-9\-_\s\c\<\>\[\]\n]*)</p>
In the Sigil find/replace dialog box but it kept saying that it couldn't find the search term

edit: I am an idiot. Didn't make sure the regular expression box was ticked. Will try again tomorrow.

Last edited by Katdragon; 07-19-2010 at 08:18 PM.
Katdragon is offline   Reply With Quote
Old 07-19-2010, 08:19 PM   #727
Katdragon
Connoisseur
Katdragon began at the beginning.
 
Posts: 98
Karma: 40
Join Date: May 2010
Device: Kobo (currently out of commission), Kindle 3
Hi everyone,
I tried the method in my previous post and whilst it got rid all of the line breaks the first letter of every paragraph has vanished.

Here is the code now:
Code:
 <div>
              <p class="calibre1"></p>

              <div class="calibre10">
                harlie is one of the big good guys in my universe. He gave me enough of a raise when I finished school (high school diploma by the skin of my teeth and the intercession of my subversive English teacher) and began working for him full time that I could afford my own place, and, even more important, he talked Mom into letting me have it.

                <div>
                  <p class="calibre1"></p>

                  <div class="calibre10">
                    ut getting up at four A.M. six days a week does put a cramp on your social life (although as Mom pointed out every time she was in a
etc...

Should I keep trying with this method or go through the other ones listed here?
Katdragon is offline   Reply With Quote
Old 07-19-2010, 09:13 PM   #728
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,889
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Quote:
Originally Posted by Katdragon View Post
Hi everyone,
I tried the method in my previous post and whilst it got rid all of the line breaks the first letter of every paragraph has vanished.

Should I keep trying with this method or go through the other ones listed here?
If you lost the first letter then it is time to start fresh because whatever you did didn't work.
DoctorOhh is offline   Reply With Quote
Old 07-20-2010, 08:29 AM   #729
Katdragon
Connoisseur
Katdragon began at the beginning.
 
Posts: 98
Karma: 40
Join Date: May 2010
Device: Kobo (currently out of commission), Kindle 3
Okies, a friend of mine solved the problem for me.
I used e-texteditor and replaced
Code:
<div
     class="calibre10">\W+(.)\W+</div>\W+<p>
with
Code:
<p>$1
This -has- made the letter "I" (in a word) stick to the front of the paragraph e.g. "Iwent to the shops" but I can't think of a way to fix this other than by hand.

Edit: Fixed the above problem - I replaced <p>I with <p>I&nbsp; and then <p>I t with <p>It

Thanks so much for your help guys

Last edited by Katdragon; 07-20-2010 at 08:40 AM.
Katdragon is offline   Reply With Quote
Old 07-21-2010, 07:20 AM   #730
marliv
Junior Member
marliv began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jul 2010
Device: Sony PRS-505
I used installed unicode fonts on my PRS-505 by extra css
Quote:
@font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)}
@font-face {font-family: "sans-serif1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)}
body{font-family: serif1, serif}
p {font-family: serif1, serif}
h1 {font-family: sans-serif1, sans-serif}
but it don't work anymore for body text as in epub css there:
Quote:
.calibre1 {
border-bottom: 0;
border-top: 0;
display: block;
font-family: "Times New Roman", Times, serif;
margin-bottom: 0;
margin-top: 0;
padding-bottom: 0;
padding-top: 0;
text-align: justify;
text-indent: 1.5em
}
any ideas?
marliv is offline   Reply With Quote
Old 07-21-2010, 10:31 AM   #731
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,247
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by marliv View Post
...any ideas?
Assuming tt0011m_.ttf and tt0003m_.ttf are the unicode fonts you want, does this work as your extra CSS?

Code:
@font-face {font-family: serif; src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)}
@font-face {font-family: sans-serif; src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)}
html {font-family: serif;}
h1 {font-family: sans-serif;}
jackie_w is offline   Reply With Quote
Old 07-22-2010, 05:44 PM   #732
marliv
Junior Member
marliv began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jul 2010
Device: Sony PRS-505
yes, it work.

Thank you!
marliv is offline   Reply With Quote
Old 07-22-2010, 07:57 PM   #733
jayman
Enthusiast
jayman began at the beginning.
 
Posts: 33
Karma: 10
Join Date: Dec 2009
Device: iphone
Problem with literallayout

I have a book that I converted to epub format from which the book looks fine however anytime in the book there is "computer text" it runs off the page so that I can't read it on my iphone using ibook or stanza. I tried deleting literallayout but that just made all the computer text run together. Anyone know a fix for this? thanks.
jayman is offline   Reply With Quote
Old 07-22-2010, 08:12 PM   #734
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,889
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Quote:
Originally Posted by jayman View Post
I have a book that I converted to epub format from which the book looks fine however anytime in the book there is "computer text" it runs off the page so that I can't read it on my iphone using ibook or stanza. I tried deleting literallayout but that just made all the computer text run together. Anyone know a fix for this? thanks.
I'm betting the code is in <pre> tags.
DoctorOhh is offline   Reply With Quote
Old 07-22-2010, 09:49 PM   #735
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by dwanthny View Post
I'm betting the code is in <pre> tags.
And if it IS surround by <pre> tags, then your best bet would be to edit the .html file(s) within the .epub (open the .epub up with a zip archiver and edit/extract the .html files) and do the following:

1) at the end of each line within the <pre> tags append a <br /> tag (or two <br /><br /> based on your preference for blank line separation), and

2) replace the surrounding <pre> ... </pre> tags with <p> ... </p> instead.

That should make sure the lines don't run into each other, but still allow each long line to wrap around so that you can see the ending...

BTW, in 2) above, you can play with indents using <p style="text-intent: 2em"> ... </p> or hanging indents using <p style="text-intent: -2em; margin-left: 2em"> ... </p>. Experimentation is your friend!

Last edited by nrapallo; 07-22-2010 at 11:08 PM. Reason: hanging indents code: should be <p style="text-intent: -2em; margin-left: 2em">
nrapallo is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Old Thread] Epub Output: Line Height greenapple Conversion 20 01-27-2013 09:27 AM
EPUB output justification toki08 Calibre 10 01-08-2011 04:14 PM
Calibre epub output details and Nook squidward Calibre 6 11-24-2010 03:21 PM
epub output metadata troymc Calibre 5 05-22-2010 12:23 AM
Problem with epub output in Cybook Gen3 fjf Calibre 3 02-03-2010 02:23 AM


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


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