Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 03-08-2011, 08:00 AM   #1
hiperlink
Enthusiast
hiperlink began at the beginning.
 
Posts: 45
Karma: 10
Join Date: Dec 2010
Device: Kindle 3 Wifi only
Unhappy Justification problem even with extra css

Hi All!

I had created an almost complete recipe for a hungarian cultural magazine, http://www.es.hu/ and my almost last TODO item is to justify the article paragraphs.

The recipe can be viewed here: https://gist.github.com/860238

I have an extra_css in it
Code:
extra_css = '''
                    body { background-color: white; color: black }
                    .article1 { text-align: justify; }
                    p { text-align: justify; }
                    .calibre8 { text-align: justify; }
                '''
I convert it via ebook-convert commandline and using the option:
Code:
--change-justification justify
But still, in my debugdir I can see (in the processed dir stylesheet.css ) that some item was set to "text-align: left" and especiall .calibre8, which was set above to justify.

What am I doing wrong?

Thanks in advance!
hiperlink is offline   Reply With Quote
Old 03-08-2011, 10:09 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You dont use .calbre* names in extra_css you use selectors that refer to the input document, not the output document. In this case the input document is the html downloaded from the web.
kovidgoyal is offline   Reply With Quote
Advert
Old 03-09-2011, 08:40 AM   #3
hiperlink
Enthusiast
hiperlink began at the beginning.
 
Posts: 45
Karma: 10
Join Date: Dec 2010
Device: Kindle 3 Wifi only
Kovid!

I figured it out. In the original input the 'p' tags had an 'align="left"' attribute which I had removed with preprocess_regexp and now it looks good (for me).
hiperlink is offline   Reply With Quote
Reply

Tags
alignment, justification, justify


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The option "--extra-css" doesn't work slex Conversion 2 02-19-2011 06:26 AM
css pseudo elements and adjacent combinators in extra css? ldolse Calibre 2 12-21-2010 05:09 PM
a few extra css questions marbs Recipes 12 11-20-2010 10:15 AM
using "Extra CSS" box RedRoverJ Calibre 4 06-25-2010 07:08 PM
I'm having a problem with extra paragraph spaces akosimike Calibre 10 05-27-2010 06:53 PM


All times are GMT -4. The time now is 02:47 AM.


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