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 04-01-2014, 07:09 AM   #1
Nick_1964
Bookworm
Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.
 
Nick_1964's Avatar
 
Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
Linehight 1.1 em ?

A lot of books that I have, have a linehight higher then 1.1 em.
Like 1.5 but i want them to 1.1 during conversion.
Now first my biggest problem.. to translate what I have on my calibre screen to english.
Minimum linehight is at 120% and linehight itself is 0.
Making the last one higher doesn't matter,because when the linehight 1.5 em is present in the .css of the book, it let it unchanged.
I can put the minimum linehight to, lets say 80% but then books that don't have a linehight specified in the css looks like they have been washed on to high temperature.
How can I get calibre so far to get all books with a linehight at 1.1 em.
I tried to put an extra line in the .css with line-height: 1.2em !important; in it, but the reader ignores it.
Or do I have to edit every book and put the linelight in the .css to 1.1 em ?
I tried to use the search and replace,that works when there is exactly 1.5 em is specified, but when it is higher or in pt value, it doesn't work.

I have included a screenshot of how my page look likes in my language.Click image for larger version

Name:	2014-04-01 12_52_29-calibre - __ Calibre Bibliotheek __.jpg
Views:	220
Size:	99.4 KB
ID:	121103

*sorry, I am dyslectic, I can't use search because I can't find the right keywords to put in.
Nick_1964 is offline   Reply With Quote
Old 04-03-2014, 08:56 AM   #2
JLius
Village idiot
JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.
 
JLius's Avatar
 
Posts: 157
Karma: 519566
Join Date: Mar 2014
Location: Belgium
Device: sony PRS T-1
You can use REGEX to search and replace. Sure somebody here will know the correct expression (for me, regex is still a mysterie :-))
JLius is offline   Reply With Quote
Advert
Old 04-03-2014, 11:05 AM   #3
speakingtohe
Wizard
speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.
 
Posts: 4,812
Karma: 26912940
Join Date: Apr 2010
Device: sony PRS-T1 and T3, Kobo Mini and Aura HD, Tablet
I don't think Search and replace works in the CSS file.

Would be nice if it did.

line-height: ... will find most occurrences like 1.1 1.2etc. in the editor.

Helen

Edit: thanks for posting the question as I never thought to use an expression and was just changing them one at a time. Some files have multiple different line heights.

Last edited by speakingtohe; 04-03-2014 at 11:11 AM.
speakingtohe is offline   Reply With Quote
Old 04-03-2014, 04:28 PM   #4
Nick_1964
Bookworm
Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.
 
Nick_1964's Avatar
 
Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
An expression like change line-height:1.* into line-height:1.1 was perfect. in the beginning Sigil worked the same with wildcards, but they both change to regex and I don't understand them, I am to much in the wildcards as it works from dos 3 til now.
But both thanks, I gonna experience with it.
The only problem you will have is that chapternames will be changed in heights to (not if 2 and higher ) but I am a bit in the right direction.
As said, Google is not my friend because I am not good with keywords and english is not my native language ( had only one year lessons )
Nick_1964 is offline   Reply With Quote
Old 04-03-2014, 04:30 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,942
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
line-height:\s1\.\d*

Note the escaped dot
should find 1.anything (but not just 1)
theducks is offline   Reply With Quote
Advert
Old 04-04-2014, 02:36 AM   #6
JLius
Village idiot
JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.
 
JLius's Avatar
 
Posts: 157
Karma: 519566
Join Date: Mar 2014
Location: Belgium
Device: sony PRS T-1
Quote:
Originally Posted by speakingtohe View Post
I don't think Search and replace works in the CSS file.

Would be nice if it did.
I think it does, in Calibre editor. You can set the search and replace to only search in the styles.
JLius is offline   Reply With Quote
Old 04-04-2014, 04:23 AM   #7
Nick_1964
Bookworm
Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.
 
Nick_1964's Avatar
 
Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
Quote:
Originally Posted by theducks View Post
line-height:\s1\.\d*

Note the escaped dot
should find 1.anything (but not just 1)
Looks like algebra to me, I was more happy with just the wildcards, but we gonna work with it thank you.

Quote:
Originally Posted by speakingtohe View Post
I don't think Search and replace works in the CSS file.

Would be nice if it did.
It does work in the .css files to, I hate it when text is justified so I have the rule, find justify and replace it by left, put in and in the .css file it replaces it during conversion.
Only this regex drives me crazy and there are not such good tutorials in Netherlands with examples to find.
I always hoped that there would be an option buid in to choose between wildcards and regex..

Last edited by Nick_1964; 04-04-2014 at 04:30 AM.
Nick_1964 is offline   Reply With Quote
Old 04-04-2014, 10:34 PM   #8
speakingtohe
Wizard
speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.
 
Posts: 4,812
Karma: 26912940
Join Date: Apr 2010
Device: sony PRS-T1 and T3, Kobo Mini and Aura HD, Tablet
Quote:
Originally Posted by JLius View Post
I think it does, in Calibre editor. You can set the search and replace to only search in the styles.
Yes which is what I said more or less in the line you left out of your quote?

OP was looking to not have to do the books one by one I believe so bulk convert was what I was referring to by the would be nice if it did.

If you know a way to do it in the conversion process I would love to hear it.


Helen
speakingtohe is offline   Reply With Quote
Old 04-05-2014, 04:54 AM   #9
Nick_1964
Bookworm
Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.
 
Nick_1964's Avatar
 
Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
Quote:
Originally Posted by speakingtohe View Post
Yes which is what I said more or less in the line you left out of your quote?

OP was looking to not have to do the books one by one I believe so bulk convert was what I was referring to by the would be nice if it did.

If you know a way to do it in the conversion process I would love to hear it.


Helen
Quote:
Originally Posted by speakingtohe View Post
Yes which is what I said more or less in the line you left out of your quote?

OP was looking to not have to do the books one by one I believe so bulk convert was what I was referring to by the would be nice if it did.

If you know a way to do it in the conversion process I would love to hear it.


Helen
It works during conversion, you are quite right I didn't ask it to do in the editor.
In the editor it is more simple to just open css and remove the line.
But during conversion ( or mass conversion ) it works to, only with the terrible regex, I am not pleased but I gonna work with it.
Here is a screenshot ( in my language ) where to fill it in.
Click image for larger version

Name:	2014-04-05 10_49_19-calibre - __ Calibre Bibliotheek __.jpg
Views:	267
Size:	100.0 KB
ID:	121249

If you do a batch conversion, it also looks in the .css and replace it.

edit:
But the given regex doesn't work.
Seek regex: line-height:\s1\.\d* and replace by line-height: 1.5em or Seek regex: line-height: \s1\.\d* and replace it by line-height: 1.5em.
in the original .css the line is : line-height: 1.5em, there is a space between the : and the 1.5... I now gonna edit the .css file and remove the space, just to see if the regex does work and the space is a problem...

Last edited by Nick_1964; 04-05-2014 at 05:52 AM.
Nick_1964 is offline   Reply With Quote
Old 04-05-2014, 05:59 AM   #10
Nick_1964
Bookworm
Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.
 
Nick_1964's Avatar
 
Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
The original part in the .css is :
.zenoplat {
border-bottom: 0;
border-top: 0;
display: block;
font-size: 1em;
font-style: normal;
font-variant: normal;
font-weight: normal;
line-height: 1.5em;
padding-bottom: 0;
padding-top: 0;
text-align: left;
margin: 0
}
The line-height must be changed in line-height: 1.1em;
Who knows the right regex to do it ?
Nick_1964 is offline   Reply With Quote
Old 04-05-2014, 11:44 AM   #11
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,942
Karma: 60358908
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 Nick_1964 View Post
edit:
But the given regex doesn't work.
Seek regex: line-height:\s*1\.\d* and replace by line-height: 1.5em or Seek regex: line-height: \s*1\.\d* and replace it by line-height: 1.5em.
in the original .css the line is : line-height: 1.5em, there is a space between the : and the 1.5... I now gonna edit the .css file and remove the space, just to see if the regex does work and the space is a problem...
Oops
I should have written \s* which is 0 or more whitespace
theducks is offline   Reply With Quote
Old 04-05-2014, 02:04 PM   #12
Nick_1964
Bookworm
Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.
 
Nick_1964's Avatar
 
Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
Quote:
Originally Posted by theducks View Post
Oops
I should have written \s* which is 0 or more whitespace
We gonna try it again thank you !
In Sigil this works, in Calibre not so it seems that search and replace for bulk conversion skips the css
I got to find something else and go back to my first screen,find the solution in the look and behave screen in this post : https://www.mobileread.com/forums/sho...78&postcount=1

Last edited by Nick_1964; 04-05-2014 at 02:23 PM.
Nick_1964 is offline   Reply With Quote
Old 04-06-2014, 06:11 AM   #13
speakingtohe
Wizard
speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.
 
Posts: 4,812
Karma: 26912940
Join Date: Apr 2010
Device: sony PRS-T1 and T3, Kobo Mini and Aura HD, Tablet
Quote:
Originally Posted by Nick_1964 View Post
It works during conversion, you are quite right I didn't ask it to do in the editor.
In the editor it is more simple to just open css and remove the line.
But during conversion ( or mass conversion ) it works to, only with the terrible regex, I am not pleased but I gonna work with it.
Here is a screenshot ( in my language ) where to fill it in.
Attachment 121249

If you do a batch conversion, it also looks in the .css and replace it.

edit:
But the given regex doesn't work.
Seek regex: line-height:\s1\.\d* and replace by line-height: 1.5em or Seek regex: line-height: \s1\.\d* and replace it by line-height: 1.5em.
in the original .css the line is : line-height: 1.5em, there is a space between the : and the 1.5... I now gonna edit the .css file and remove the space, just to see if the regex does work and the space is a problem...
Hmmm... I have tried it a few times in the bulk convert with no change in the CSS.

The same expressions I have tried work fine in the editor.

Let us know if you can make it work in bulk convert

HELEN
speakingtohe is offline   Reply With Quote
Old 04-06-2014, 06:36 AM   #14
Nick_1964
Bookworm
Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.
 
Nick_1964's Avatar
 
Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
Quote:
Originally Posted by speakingtohe View Post
Hmmm... I have tried it a few times in the bulk convert with no change in the CSS.

The same expressions I have tried work fine in the editor.

Let us know if you can make it work in bulk convert

HELEN
Thats what I said, the search and replace looked like it was working on the .css but it was another setting that was changing something in the .css, So we have to go back to screen and post one. ( look and feel during conversion)

The problem I see there is the minimum lineheight 120 %.
That looks promising but books that have not specified the line-height in the .css or have another value will be affected to.
When I set it to low and do a batch conversion,all books that have no line-height or have a smaller value will be changed to.
You can't put a minimal lineheight in it, ( there is no option ) so it is useless in batch conversion.
The linehight button next to it, only changes the values when they are not set in the .css so if you put a line-hight there all sections in the .css that not have the line-heigt value in it will be updated with the new line-height, however, the section that has a pre-defined line-height ( and that is the section you want to change) will not be affected by this setting.

There should have been an option: set minimal line-height at 1.2 em ( or what ever you want ) lower will not be changed, heigher will be put back to the value specified.
Or at the other field (search and replace) an option for include .css
But how to ask this to the maker of Calibre, I tried in the past...

Most ideal would be an e-book that says, hey reader, tell me your settings and I act accordingly.
Now most of the conversion in e-pub to e-pub is a little bit useless,because after it, I still have to edit earch book to change value's in the .css ...
But I don't give up yet.. I have a kobo reader.

Last edited by Nick_1964; 04-06-2014 at 06:41 AM.
Nick_1964 is offline   Reply With Quote
Old 04-06-2014, 06:49 AM   #15
speakingtohe
Wizard
speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.
 
Posts: 4,812
Karma: 26912940
Join Date: Apr 2010
Device: sony PRS-T1 and T3, Kobo Mini and Aura HD, Tablet
Quote:
Originally Posted by Nick_1964 View Post
Thats what I said, the search and replace looked like it was working on the .css but it was another setting that was changing something in the .css, So we have to go back to screen and post one. ( look and feel during conversion)

The problem I see there is the minimum lineheight 120 %.
That looks promising but books that have not specified the line-height in the .css or have another value will be affected to.
When I set it to low and do a batch conversion,all books that have no line-height or have a smaller value will be changed to.
You can't put a minimal lineheight in it, ( there is no option ) so it is useless in batch conversion.
The linehight button next to it, only changes the values when they are not set in the .css so if you put a line-hight there all sections in the .css that not have the line-heigt value in it will be updated with the new line-height, however, the section that has a pre-defined line-height ( and that is the section you want to change) will not be affected by this setting.

There should have been an option: set minimal line-height at 1.2 em ( or what ever you want ) lower will not be changed, heigher will be put back to the value specified.
Or at the other field (search and replace) an option for include .css
But how to ask this to the maker of Calibre, I tried in the past...

Most ideal would be an e-book that says, hey reader, tell me your settings and I act accordingly.
Now most of the conversion in e-pub to e-pub is a little bit useless,because after it, I still have to edit earch book to change value's in the .css ...
Yes we wish
Overall I am happy with a global line height change, even if I have to do it one book at a time in the editor. Usually headings stay the same or stand out enough for me. I find it almost unbearable to read books that have line height of 2.0 or higher throughout (probably because I am spoiled by calibre).

It would be nice to have a checkbox or something in the search and replace that would let a person select to include/exclude the CSS file.

Probably a good programming reason it can't be done though.

Helen
speakingtohe is offline   Reply With Quote
Reply


Forum Jump


All times are GMT -4. The time now is 05:22 PM.


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