![]() |
#1 |
Bookworm
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. *sorry, I am dyslectic, I can't use search because I can't find the right keywords to put in. |
![]() |
![]() |
![]() |
#2 |
Village idiot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 :-))
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#4 |
Bookworm
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 ![]() |
![]() |
![]() |
![]() |
#5 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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) |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Village idiot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 157
Karma: 519566
Join Date: Mar 2014
Location: Belgium
Device: sony PRS T-1
|
|
![]() |
![]() |
![]() |
#7 | ||
Bookworm
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
|
Quote:
![]() Quote:
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. |
||
![]() |
![]() |
![]() |
#8 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,812
Karma: 26912940
Join Date: Apr 2010
Device: sony PRS-T1 and T3, Kobo Mini and Aura HD, Tablet
|
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 |
|
![]() |
![]() |
![]() |
#9 | ||
Bookworm
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
|
Quote:
Quote:
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. 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. |
||
![]() |
![]() |
![]() |
#10 |
Bookworm
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 ? |
![]() |
![]() |
![]() |
#11 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
![]() I should have written \s* which is 0 or more whitespace |
|
![]() |
![]() |
![]() |
#12 |
Bookworm
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
|
We gonna try it again
![]() 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. |
![]() |
![]() |
![]() |
#13 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,812
Karma: 26912940
Join Date: Apr 2010
Device: sony PRS-T1 and T3, Kobo Mini and Aura HD, Tablet
|
Quote:
The same expressions I have tried work fine in the editor. Let us know if you can make it work in bulk convert ![]() HELEN |
|
![]() |
![]() |
![]() |
#14 | |
Bookworm
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
|
Quote:
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. |
|
![]() |
![]() |
![]() |
#15 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,812
Karma: 26912940
Join Date: Apr 2010
Device: sony PRS-T1 and T3, Kobo Mini and Aura HD, Tablet
|
Quote:
![]() 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 |
|
![]() |
![]() |