Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 09-13-2014, 01:31 PM   #1
Arkadian
Connoisseur
Arkadian began at the beginning.
 
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...
Arkadian is offline   Reply With Quote
Old 09-13-2014, 02:19 PM   #2
arspr
Dead account. Bye
arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.
 
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;
}
arspr is offline   Reply With Quote
Advert
Old 09-13-2014, 04:13 PM   #3
Arkadian
Connoisseur
Arkadian began at the beginning.
 
Posts: 96
Karma: 10
Join Date: Mar 2014
Device: none
Thanks for that, but where should I enter it?
Arkadian is offline   Reply With Quote
Old 09-15-2014, 06:02 AM   #4
Arkadian
Connoisseur
Arkadian began at the beginning.
 
Posts: 96
Karma: 10
Join Date: Mar 2014
Device: none
Hi, sorry for the bother again, but any advice on this?
Arkadian is offline   Reply With Quote
Old 09-15-2014, 01:27 PM   #5
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
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.
Toxaris is offline   Reply With Quote
Advert
Old 09-15-2014, 02:51 PM   #6
Arkadian
Connoisseur
Arkadian began at the beginning.
 
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
Arkadian is offline   Reply With Quote
Old 09-15-2014, 02:53 PM   #7
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
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.
eschwartz is offline   Reply With Quote
Old 09-15-2014, 03:35 PM   #8
Arkadian
Connoisseur
Arkadian began at the beginning.
 
Posts: 96
Karma: 10
Join Date: Mar 2014
Device: none
Quote:
Originally Posted by eschwartz View Post
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?
Indeed, but if I know or, more properly, understood, where that file is located I wouldn't be asking, would I. Even now, I don't know where those lines have ended up as I cannot find a file containing them.

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)
Arkadian is offline   Reply With Quote
Old 09-15-2014, 03:52 PM   #9
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
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.
Toxaris is offline   Reply With Quote
Old 09-15-2014, 03:55 PM   #10
Arkadian
Connoisseur
Arkadian began at the beginning.
 
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.
Arkadian is offline   Reply With Quote
Old 09-15-2014, 04:23 PM   #11
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
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":

Click image for larger version

Name:	CSSStep1.png
Views:	337
Size:	50.0 KB
ID:	128388

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 image for larger version

Name:	CSSStep2.png
Views:	386
Size:	39.4 KB
ID:	128389

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...":

Click image for larger version

Name:	CSSStep3.png
Views:	330
Size:	44.0 KB
ID:	128390 Click image for larger version

Name:	CSSStep4.png
Views:	333
Size:	4.1 KB
ID:	128391

Now, if you open the HTML file, you should see that some code is at the top, pointing to the Stylesheet.

Click image for larger version

Name:	CSSStep5.png
Views:	312
Size:	93.8 KB
ID:	128392

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
Tex2002ans is offline   Reply With Quote
Old 09-15-2014, 04:43 PM   #12
Arkadian
Connoisseur
Arkadian began at the beginning.
 
Posts: 96
Karma: 10
Join Date: Mar 2014
Device: none
Hi Tex,

thanks for that.
Quote:
Originally Posted by Tex2002ans View Post
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":

Attachment 128388

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:

Attachment 128389

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 { [...] }".
OK, so far so good, but what I see is different, and that is where my problem is...

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
    }
I was expecting to see the code I entered in the "extra css pane" to pop up somewhere, but it hasn't...

Now, I did try to enter that code in both files, but it didn't like it and gave me an error instead.

Quote:
Originally Posted by Tex2002ans View Post
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...":

Attachment 128390 Attachment 128391

Now, if you open the HTML file, you should see that some code is at the top, pointing to the Stylesheet.

Attachment 128392

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
Indeed, I need to brush up my very scant css skills, but I do need to get this bloody thing out of the door, and, incredible though it may sound, I did manage to solve most of my problems reading here and there and trying to make sense of it all
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2014-09-15 21.36.07.png
Views:	221
Size:	67.3 KB
ID:	128393  
Arkadian is offline   Reply With Quote
Old 09-15-2014, 05:01 PM   #13
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Arkadian View Post
but then I have a second one called page_styles which contains only

Code:
@page {
    margin-bottom: 5pt;
    margin-top: 5pt
    }
Ok, page_styles.css is just a SECOND CSS stylesheet generated by Calibre (you can apply more than one at the same time, you can have a million CSS stylesheets "linked" to an HTML file if you wanted). Typically a book will only have ONE stylesheet, although Calibre tries to separate the stuff on a PER PAGE level into page_style.css, while things effecting the BOOK level, will be in stylesheet.css.

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:
Originally Posted by Arkadian View Post
Now, I did try to enter that code in both files, but it didn't like it and gave me an error instead.
What gave an error where?

So you see where in your image you have:

Code:
.block_ {
	display: block;
	font-family: "Courier New", serif;
	[...]
}
What you will want to do, is add the body code BEFORE that. So you want the stylesheet.css file to start out like this:

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.
Tex2002ans is offline   Reply With Quote
Old 09-15-2014, 05:05 PM   #14
Arkadian
Connoisseur
Arkadian began at the beginning.
 
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:
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2014-09-15 22.04.43.png
Views:	240
Size:	178.4 KB
ID:	128395  
Arkadian is offline   Reply With Quote
Old 09-15-2014, 06:20 PM   #15
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Arkadian View Post
I had done exactly that, and this is what I am getting out:
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).
  • hyphens: none;
    • This one is the official CSS3 way to do it. This says to not use hyphenation on any device that can recognize CSS3.
  • adobe-hyphenate: none;
    • This one says any Adobe-based renderer to not use hyphenation
    • For example, ADE, and all of the ADE-based readers (Nook, Sony, Kobo, Mantano, Bluefire, etc. etc.).
  • -moz-hyphens: none;
    • This one says any Mozilla-based renderer to not use hyphenation
    • For example, Firefox
  • -webkit-hyphens: none;
    • This one tells any Webkit-based render to not use hyphenation
    • For example, iBooks
  • hyphenate: none;
    • Don't know exactly what this one is aimed for. (Maybe Kindle? I forget exactly which one Kindlegen uses CSS hyphenation from)

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).
Tex2002ans is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 01:08 PM.


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