05-13-2010, 07:39 PM | #1 |
eBook FANatic
Posts: 18,301
Karma: 16071131
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
|
Justification by Sigil
In the HTML file, all chapter headings are centered. After loading into Sigil, all chapter headings are left justified.
Is this intentional or an artifact of the tools incorporated into Sigil? |
05-14-2010, 02:16 AM | #2 |
Zealot
Posts: 147
Karma: 56
Join Date: Dec 2009
Location: Antwerpen
Device: iPhone, Sony PRS-505, EPUBreader
|
Strange. If they are, there must be some instruction in the CSS-file or CSS-headers of the original HTML. Try adding this to the CSS-file if you want headings to be centered:
Code:
h1, h2, h3, h4, h5, h6 {text-align: center} |
Advert | |
|
05-14-2010, 04:56 AM | #3 |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
|
05-14-2010, 06:03 AM | #4 | |
eBook FANatic
Posts: 18,301
Karma: 16071131
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
|
Quote:
Code:
<style type="text/css"> BODY { MARGIN-LEFT: 15%; MARGIN-RIGHT: 15% } P { TEXT-ALIGN: justify; MARGIN-TOP: 0.75em; MARGIN-BOTTOM: 0.75em } H1 { TEXT-ALIGN: center; CLEAR: both } H2 { TEXT-ALIGN: center; CLEAR: both } H3 { TEXT-ALIGN: center; CLEAR: both } H5 { TEXT-ALIGN: center; CLEAR: both } H6 { TEXT-ALIGN: center; CLEAR: both } H4 { TEXT-ALIGN: center; CLEAR: both; FONT-WEIGHT: normal } HR { MARGIN: 2em auto; WIDTH: 45%; HEIGHT: 1px; CLEAR: both } A:link { COLOR: navy; TEXT-DECORATION: none } A:visited { COLOR: maroon; TEXT-DECORATION: none } A:hover { TEXT-DECORATION: underline } A:active { COLOR: navy } .pagenum { POSITION: absolute; TEXT-ALIGN: right; COLOR: gray; FONT-SIZE: smaller; LEFT: 92% } .hoverlink { BORDER-BOTTOM-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-TOP-STYLE: none; BORDER-LEFT-STYLE: none } .hoverbox { BORDER-BOTTOM: gray 0.07em dotted } .center { TEXT-ALIGN: center } .right { TEXT-ALIGN: right } .left { TEXT-ALIGN: left } .dropcap { TEXT-INDENT: -0.5em; MARGIN-LEFT: 0px } .frstltr { DISPLAY: none } .smcap { FONT-VARIANT: small-caps } .smfont { FONT-SIZE: smaller } .lgfont { FONT-SIZE: larger } .serfont { FONT-FAMILY: serif } .sansfont { FONT-FAMILY: sans-serif } .figcenter { TEXT-ALIGN: center; MARGIN: auto } .figcenter P { TEXT-ALIGN: center; FONT-SIZE: smaller; FONT-WEIGHT: bold } .figcap { TEXT-ALIGN: center; PADDING-BOTTOM: 0px; MARGIN: -0.25em 0.5em 0px 0px; PADDING-LEFT: 0px; WIDTH: auto; PADDING-RIGHT: 0px; FLOAT: left; CLEAR: left; PADDING-TOP: 0px } .tranotes { PADDING-LEFT: 1em; WIDTH: 85%; PADDING-RIGHT: 1em; BACKGROUND: #fbf5e6; MARGIN-LEFT: auto; FONT-SIZE: smaller; MARGIN-RIGHT: auto } a.sgc-3 {font-weight: bold} h2.sgc-2 {font-style: italic} a.sgc-1 {font-style: italic} </style> |
|
05-14-2010, 06:51 AM | #5 | |
eBook FANatic
Posts: 18,301
Karma: 16071131
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
|
Quote:
Edit: Should have also have sent the HTML. Last edited by crutledge; 05-14-2010 at 07:14 AM. |
|
Advert | |
|
05-14-2010, 07:38 AM | #6 |
eBook Enthusiast
Posts: 120
Karma: 726
Join Date: Dec 2007
Location: US
Device: Sony PRS-350, Astak PocketPro, iPhone, Asus eee Pad Transformer
|
Unless I'm mistaken, the css instructions need to be in lower-case. I changed the case of the css in the file and headings were then centered.
|
05-14-2010, 07:54 AM | #7 | |
eBook FANatic
Posts: 18,301
Karma: 16071131
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
|
Quote:
Are there provision in Sigil to convert text to Upper Case, Lower case, and Proper case? |
|
05-14-2010, 08:11 AM | #8 |
eBook Enthusiast
Posts: 120
Karma: 726
Join Date: Dec 2007
Location: US
Device: Sony PRS-350, Astak PocketPro, iPhone, Asus eee Pad Transformer
|
It doesn't seem to matter to my browsers or to the calibre epub reader ...
Apparently Sigil is sensitive to case. |
05-14-2010, 08:34 AM | #9 |
Guru
Posts: 718
Karma: 1085610
Join Date: Mar 2009
Location: Bristol, England
Device: PRS-T1, 1825PT, Galaxy Tab, One X, TF700T, Aura HD, Nexus 7
|
You browsers wouldn't care about the case as they read HTML which isn't case sensitive, but epub uses XHTML which required the case to be lower-case for all your tags. Sigil is an epub editor, so the book view would need the tags to be in lower-case.
Hence why changing the case resolved the problem. I imagine Calibre doesn't have a problem with the case of the tags due to it being able to also display HTML files as well as epub. Sigil has HTML Tidy embedded in it and does a resonable job trying to correct the case of the tags in the XHTML files but doesn't get everything. So to make sure everything works, only work in lowercase in your tags. The exception to this is SVG as it has some special parameters (I think) that are in upper and mixed case. |
05-14-2010, 09:41 AM | #10 |
eBook FANatic
Posts: 18,301
Karma: 16071131
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
|
With the bevy of experts watching this thread, I have one more problem.
After making changes of the style sheet to lower case, the Sigil file looks great and the calibre epub viewer shows everything well. However, ADE shows a problem. Each chapter begins the first paragraph with a graphic as the first letter. Initially, ADE showed the image centered and the text beside it run off the page to the right. I cured the image by changing the css for the image to align: left. I have tried several changes to the css for the text but my lack of knowledge and experience have shined through. Can someone lead this sinner to the path of true right and proper CSS? |
05-14-2010, 10:47 AM | #11 |
Guru
Posts: 718
Karma: 1085610
Join Date: Mar 2009
Location: Bristol, England
Device: PRS-T1, 1825PT, Galaxy Tab, One X, TF700T, Aura HD, Nexus 7
|
I can't quite remember the exact code but what you need is a class for those image files that float the image to where you want.
something like: <style> img.floatleft {float:left;} </style> <img class="floatleft" ..... |
05-14-2010, 10:58 AM | #12 |
eBook Enthusiast
Posts: 120
Karma: 726
Join Date: Dec 2007
Location: US
Device: Sony PRS-350, Astak PocketPro, iPhone, Asus eee Pad Transformer
|
In addition to floating the image to the left, you might consider setting the class of the first character of the paragraph to something like:
p.noshow {display: none } otherwise it will still print next to the image. |
05-14-2010, 11:06 AM | #13 | |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
Quote:
If you find some input on which this fails, please make an issue on the tracker. |
|
05-14-2010, 12:25 PM | #14 |
eBook FANatic
Posts: 18,301
Karma: 16071131
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
|
Valoric,
You are a wonder. Don't you ever sleep? |
05-14-2010, 12:57 PM | #15 |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Justification | Georgiegirl2012 | General Discussions | 21 | 09-27-2010 09:38 AM |
Can justification be changed on the K2? | dwallbaum | Amazon Kindle | 5 | 07-13-2010 10:33 PM |
PRS-900 Epub and Justification | luqmaninbmore | Sony Reader | 9 | 05-08-2010 08:21 PM |
DX justification | jlinden | Amazon Kindle | 7 | 01-18-2010 07:22 AM |
Help with text justification | jament | Calibre | 4 | 11-10-2009 05:27 PM |