09-13-2014, 01:31 PM | #1 |
Connoisseur
Posts: 96
Karma: 10
Join Date: Mar 2014
Device: none
|
Words split between lines: can I get rid of them?
I am quite sure I have read something about this, but cannot find it.
Some words get hyphenated between lines, which in some cases is really ugly. Is there a way to get rid of them? The text is left aligned, so I don't see the need for it... Is it perhaps that the letters have a fixed distance? Can't remember saying anything about that when converting in Calibre, but might have forgotten... |
09-13-2014, 02:19 PM | #2 |
Dead account. Bye
Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
|
Automatic hyphenation is managed through different CSS settings as it is a "new" CSS3 so every renderer tends to use a different one.
Set them for <body> and you should completely turn it off. Some possible properties to disable: Code:
body { adobe-hyphenate: none; hyphenate: none; hyphens: none; -moz-hyphens: none; -webkit-hyphens: none; } |
Advert | |
|
09-13-2014, 04:13 PM | #3 |
Connoisseur
Posts: 96
Karma: 10
Join Date: Mar 2014
Device: none
|
Thanks for that, but where should I enter it?
|
09-15-2014, 06:02 AM | #4 |
Connoisseur
Posts: 96
Karma: 10
Join Date: Mar 2014
Device: none
|
Hi, sorry for the bother again, but any advice on this?
|
09-15-2014, 01:27 PM | #5 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
The same stylesheet that was recommended to you in several posts. You can also check the wiki for some basic information on (X)HTML and CSS. It will help you a lot. It will answer some of your questions and with that knowledge we can help a lot better.
|
Advert | |
|
09-15-2014, 02:51 PM | #6 |
Connoisseur
Posts: 96
Karma: 10
Join Date: Mar 2014
Device: none
|
@Toxaris,
sorry if I sound stupid, but I have been spending a good part of the afternoon trying to understand where I should physically enter the code that arspr, and many others, advocate. I seem to be needing an "Extra CSS" option... After a long search I realized I am supposed to use "Look and feel", which I couldn't find because translated in my language in a funny way. Once I understood where it was I had to re-convert my epub into epub adding the css above in the "extra CSS pane" and now it seems to be working fine. However, hardly straightforward, is it? If there is an easier and more obvious way to do it, I could not find it |
09-15-2014, 02:53 PM | #7 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Easier way: By putting it in the stylesheet that you were referred to.
If this is a discussion about using the editor, why are you trying to use conversion instead? Last edited by eschwartz; 09-15-2014 at 02:56 PM. |
09-15-2014, 03:35 PM | #8 | |
Connoisseur
Posts: 96
Karma: 10
Join Date: Mar 2014
Device: none
|
Quote:
I know it is frustrating to be asked silly questions on a regular basis (and I can assure you, I DO know... ), but at the same time it is not helpful to reiterate the same answer over and over when it is obvious that communication had not being achieved the first (or second) time around (my fault, I know, but still) |
|
09-15-2014, 03:52 PM | #9 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
It does seem that you are mixing up the conversion procedure from Calibre and the editor. In the editor it is quite simple to add a stylesheet to a book and use it.
In short, conversion is for changing formats, editor for actual editing to create/fine-tune the books. |
09-15-2014, 03:55 PM | #10 |
Connoisseur
Posts: 96
Karma: 10
Join Date: Mar 2014
Device: none
|
I know that (although the editor does allow same-format to same-format conversion), but as I couldn't find another option, that was better than nothing, was it.
|
09-15-2014, 04:23 PM | #11 |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
I must admit, I am much more familiar with Sigil, but here is a basic breakdown:
If you open up Calibre, you should right click on the book you want to fix, and select "Edit Book": This will open it up using Calibre's Editor (similar functionality to Sigil, if you have ever used that program to fix an EPUB). Now that the book is open in Calibre's Editor, you should be able to look along the left-hand side under "Styles", and find a file that ends in .css: Click on that file, and it will open, you should then be able to insert the code that arspr gave above. Note: There might already be code in the CSS file, you might want to look to see if any "body" code exists. As you can see in my sample image, there is already lots of stuff in the CSS file. If there already IS some body code, you might just want to add the hyphen stuff in between the squiggly brackets: "body { [...] }". Now, you just have to make sure that your CSS file is "linked" to the HTML files, by right clicking on the HTML file, and selecting "Link stylesheets...": Now, if you open the HTML file, you should see that some code is at the top, pointing to the Stylesheet. As was mentioned before though, it would probably be a good idea to brush up on at least some very basic HTML/CSS, so you aren't COMPLETELY lost. If you need any more help, feel free to ask. There is also some info in the Calibre Manual: http://manual.calibre-ebook.com/edit.html |
09-15-2014, 04:43 PM | #12 | ||
Connoisseur
Posts: 96
Karma: 10
Join Date: Mar 2014
Device: none
|
Hi Tex,
thanks for that. Quote:
My stylesheet looks like this (first image) but then I have a second one called page_styles which contains only Code:
@page { margin-bottom: 5pt; margin-top: 5pt } Now, I did try to enter that code in both files, but it didn't like it and gave me an error instead. Quote:
|
||
09-15-2014, 05:01 PM | #13 | ||
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
That @page code above just says "on each page, make the top and bottom margins 5pt big". You can completely ignore the page_style.css file (don't shove any extra stuff in there). Just focus on stylesheet.css. Quote:
So you see where in your image you have: Code:
.block_ { display: block; font-family: "Courier New", serif; [...] } Code:
body { adobe-hyphenate: none; hyphenate: none; hyphens: none; -moz-hyphens: none; -webkit-hyphens: none; } .block_ { display: block; font-family: "Courier New", serif; [...] } [...] Last edited by Tex2002ans; 09-15-2014 at 05:03 PM. |
||
09-15-2014, 05:05 PM | #14 |
Connoisseur
Posts: 96
Karma: 10
Join Date: Mar 2014
Device: none
|
Hi there,
I had done exactly that, and this is what I am getting out: |
09-15-2014, 06:20 PM | #15 |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Ahhh I see, Calibre complaining about it. Well the way CSS works, if something is not recognized, it should just be completely ignored (this makes it easy for things to be backwards+forwards compatible with future/experimental updates).
It is safe to ignore Calibre's warnings/complaints in this specific case. As a side question, what device are you reading on? Does it not have a hyphenation toggle to turn it on/off (most new readers do). |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
File split sometimes shows more split lines | DrChiper | Editor | 1 | 12-23-2013 05:38 PM |
Do you have to use Sigil to let your device know how to split words? | sunny1z | Sigil | 3 | 01-21-2013 02:33 PM |
Glo epub. words split without logic | sunny1z | Kobo Reader | 10 | 01-14-2013 08:23 AM |
split words at end of line | Smknox | Introduce Yourself | 4 | 08-26-2012 04:03 AM |
How to get rid of bright yellow lines around book list? | OverTwo | Calibre | 24 | 02-13-2011 11:13 AM |