View Full Version : I can not align the text...help please! XD


derfel_spain
12-11-2010, 01:36 PM
Hi there! I have a problem and I would like to know if you can help me: Im trying to convert an EPUB book to .MOBI for my Kindle but the left margin is always very wide! I put justify text, left align and reduce the left margin to 2 pt!! but the text is always on the right and the left margin is pretty big compare to the right one! :(...Do you know what Can i do??

Thank you very much!

mr ploppy
12-11-2010, 01:52 PM
Does the epub have wide margins as well? Styles set in that might be over riding your settings. I thought you could control the margins on the Kindle anyway, through one of the menu options.

DMSmillie
12-11-2010, 01:52 PM
With regard to the left margin - unless you want a paragraph to be indented, I'd suggest setting the left margin to 0. All eReaders that I know of provide a margin of clear space around the area used to display the content on the screen, so you shouldn't need to specify a margin (unlike a printed page, where you need to specify the margin between the edge of the paper and print area).

With regard to the justification, I'm a bit confused - you say you set it to justify, but also refer to left align...? When you say the text is always on the right, do you mean it's right aligned, with a ragged left margin? Or just that there's a sizeable margin on the left?

Something else to check is whether the BLOCKQUOTE tag is being used around these paragraphs - that can result is a sizeable left indent on paragraphs when viewed on a Kindle or in the Kindle Previewer, and the amount of indent not so easy to control on the Kindle as it is in an EPUB file. Ideal for actual block quotes, but probably best avoided otherwise in a MOBI file.

Hope some of that helps.

derfel_spain
12-11-2010, 04:12 PM
Thank you very much for your reply! I really appreciate it!!

When i see the epub in calibre...everything is justified and both margin are ok! But once I transfer to Kindle, the text is justified but the left margin is wider than the right one!! very annoying!! Im gonna try to put left margin 0 to see what happens! More ideas?? Thank you again!

derfel_spain
12-11-2010, 04:36 PM
Sorry again to bother you!!

I set the left margin to 0 and it remains the same!! I just transfered again the book ( The stand ) and the left matgin is way wider than the right one! Everything justified but uneven margins...What can i do?? :(

DMSmillie
12-11-2010, 05:52 PM
It's hard to work out the best solution without being able to look at the book, derfel_spain, but here is a suggestion you could try:

When you click on the "Convert Book" button, and select MOBI output, click on the "Look and Feel" option in the menu on the left of the conversion window.

In the box labelled "Extra CSS", type in the following text:

p,div {margin-left:0;margin-right:0}

Then go ahead with the conversion and see if that fixes the margin.

If it doesn't, try again, but this time in "Extra CSS", try:

p,div,blockquote {margin-left:0}

I'm not too happy about trying this, since it might interfere with formatting in other places in the book that you want to keep, but it might at least help to pin down what is causing the problem.

Another option would be to use the Sigil application to edit a copy of the EPUB, and try to fix the formatting that way, but if you haven't used Sigil before, you might prefer not to try that. There's a Sigil forum here in MobileRead with information about the application and links to download it.

theducks
12-11-2010, 07:05 PM
Sorry again to bother you!!

I set the left margin to 0 and it remains the same!! I just transfered again the book ( The stand ) and the left matgin is way wider than the right one! Everything justified but uneven margins...What can i do?? :(

There are can be many margins
The outermost (box model) margin is Body
Inside there is another set of Boxes.
Sometimes, these are DIV tags that surround the entire body.

Then there is the various Paragraph classes in side (Typical is a first para class and the rest the standard style.)

Past that (complex styles), any level of nested boxes. :chinscratch:

In addition to Margin, there is PADDING and Border. :eek:

Work from the inside out ( P-> body) to discover what may be causing the white space.

derfel_spain
12-11-2010, 07:41 PM
Oh my God! I will try!! But...this is complicate!! hahaha...I did not know you need to be a genius to use Calibre! Damn it!! XD...Thanks for the advice!

I just tried to type these two sentences you just gave me and it does not work :( and...using this program you just told me sounds a bit crazy since I do not even feel capable of using Calibre properly! LOL...

I will try to find a different version of this book because I do not like to read with such a huge left margin and waste part of the screen!

Thank you again!!

DMSmillie
12-11-2010, 07:55 PM
Sorry we weren't able to fix the problem, derfel_spain. It looks like you'd need to be able to edit the HTML in the EPUB file, and that could be complex - OK if you know HTML and CSS, but not so easy if you're not familiar with those. Many books convert from EPUB to MOBI in Calibre without any problems at all - you were just a bit unlucky with this one, I'm afraid.

theducks
12-11-2010, 11:33 PM
Oh my God! I will try!! But...this is complicate!! hahaha...I did not know you need to be a genius to use Calibre! Damn it!! XD...Thanks for the advice!

I just tried to type these two sentences you just gave me and it does not work :( and...using this program you just told me sounds a bit crazy since I do not even feel capable of using Calibre properly! LOL...

I will try to find a different version of this book because I do not like to read with such a huge left margin and waste part of the screen!

Thank you again!!

HTML is really quite simple, once you start thinking in boxes and opperations that apply to boxes (or are simply inherited from the outer box)

Do this:
Print out a page of of a book.
Now make Horizontal cuts between the Paragraphs (you might want to mark a number on the back to help order them later). Trim off the edges, the same amount.

Now take a Blank Page. This is the Body. Mark som margins on the 4 edges.
Hey we just set some of the the Body Style Margins

Now grab the First strip. Is i the Heading. Place it, right,Left,Down from the top Body Margin, allow some White space below
This is the "heading style" margins

Place the next strip. First Paragraph, No indent, basic upper and lower margins
This is the First_Para style.

Ok now place the remaining. Indented, Upper and lower margins (adds to the lower of the previous, to make the visible paragraph spacing)

That's it. Boxes (Headings and Paragraphs), Stacked within a Box (Body)

4 Styles and you have all you need for a Basic page layout.

All the rest, just adds MORE :D (HTML has built in defaults if you don't specify your own)

derfel_spain
12-12-2010, 04:32 AM
Wow! I can tell you are very fond on these things!! Im not bad at computers but this is a bit to much for me!! haha...Btw...if I send you the file...do you think you could convert for me!? Maybe you know how to do it! It is a 1100 pages book and I would like to read it properly!! LOL...If you do not want I would understand! my email is solopollo2001@hotmail.com...if you want, just drop i line so I can know your email and I send you the file!

Thank you again!

theducks
12-12-2010, 10:55 AM
Wow! I can tell you are very fond on these things!! Im not bad at computers but this is a bit to much for me!! haha...Btw...if I send you the file...do you think you could convert for me!? Maybe you know how to do it! It is a 1100 pages book and I would like to read it properly!! LOL...If you do not want I would understand! my email is solopollo2001@hotmail.com...if you want, just drop i line so I can know your email and I send you the file!

Thank you again!

You can't afford my rates :D ( I do this, simply for my own use and enjoyment)

1000 pages, dead tree :eek:

It could be simple. A simple Reverse engineer and adjust the Style sheet.

or it could be a nightmare (Conversions of MS word documents, poorly done) (hint: If the style sheet has over 300 lines, you have one of those)

derfel_spain
12-12-2010, 06:22 PM
Theducks! I have no idea what are u talking about LOL

"It could be simple. A simple Reverse engineer and adjust the Style sheet." I do not know what do you mean! Thank you for your help! I though it might be easy for someone like you who knows a lot about this stuff...But if it is to troublesome I understand!

I guess I will have to read this book like this! what a pity this is the longest one!! damn it!! hahaha

Toxaris
12-13-2010, 03:17 AM
If I understand correctly, it displays perfectly as ePub. However, as soon as you convert it to MOB, your left margin becomes wide? Perhaps you should report it to Kovid (I assume you use Calibre), perhaps it's a bug.

derfel_spain
12-13-2010, 03:43 AM
Exactly! Thats what happens! Someone in facebook reported it so maybe the next update of Calibre contains an option to fix this or solve this problem! We will see!! thanks!

DMSmillie
12-13-2010, 05:25 AM
derfel_spain : I just spotted the following thread describing the same problem you're having - it might provide you with some possible solutions:

http://www.mobileread.com/forums/showthread.php?t=92460

It confirms that this appears to be a known problem in Calibre.

derfel_spain
12-17-2010, 03:40 AM
Ok thank you! Im gonna have a look!! Cheers!

ldolse
12-18-2010, 09:45 AM
The latest version of Calibre does indeed have an update which fixes this problem for Mobi users. Basically Calibre just does what most users have been doing manually - anywhere there is an left-margin it just deletes it. I'm not sure where the feature resides in Calibre, best to ask on the Calibre sub-forum, but it's in the release notes.