11-13-2011, 06:51 AM | #1 |
Zealot
Posts: 115
Karma: 10
Join Date: Jan 2011
Device: none
|
assigning styles to headings
Being a newbie, i ask many silly questions. Here is one:
Is it possible in Sigil to assign particular styles from the stylesheet to each heading instead of doing it manually in the code view? I could not find it in the user manual. Thanks for the help. |
11-13-2011, 07:21 AM | #2 |
Wanderer
Posts: 106
Karma: 472218
Join Date: Jan 2011
Device: Kindle 3, PaperWhite 2
|
In book view you can assign headings to the text (h1, h2, etc.)
This will assign any formatting you have in the stylesheet for the headings. You will have to open the stylesheet (.css) file in code view to change the styles for the headings. |
Advert | |
|
11-13-2011, 09:35 AM | #3 |
Zealot
Posts: 115
Karma: 10
Join Date: Jan 2011
Device: none
|
What i don't know is how to write code for headings in .css. When i open .css there are only styles for the text (calibre; calibre1; calibre2; etc.). No mention of the headings.
|
11-13-2011, 10:34 AM | #4 | |
Well trained by Cats
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Example (from experience ) .calibre (or .calibre3) is typically used in the body tag within the book Code:
<body class="calibre" > OK back to your problem. If a selector exists (look at your books headings in CV ) in the CSS, you can just use it in the book, elsewhere. if it does not exist, roll your own. ADE on my PEz does not automatically center headings(as expected HTML should), so I create a selector: Code:
.chapterno { text-align: center; text-indent: 0; /* any other chapter header styling here */ } --- and I use it: <h3 class="chapterno">Chapter 42: <br />Life, the Universe and Me</h3> |
|
11-13-2011, 11:35 AM | #5 |
Zealot
Posts: 115
Karma: 10
Join Date: Jan 2011
Device: none
|
Evidently, i did not formulate my question clearly enough; what i would like to be able to do is to assign specific & distinct styles to each one of the tags (h1, h2, etc.), using existing styles (calibre1, 2, etc.), so that when i use the heading selector, Sigil would automatically use the proper style and not the style from the source.
|
Advert | |
|
11-13-2011, 01:53 PM | #6 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
I understood what you wanted and no, not at this moment. You can only select a subset of standard styles.
|
11-13-2011, 02:22 PM | #7 |
Grand Sorcerer
Posts: 5,886
Karma: 464403178
Join Date: Feb 2010
Location: 33.9388° N, 117.2716° W
Device: Kindles K-2, K-KB, PW 1 & 2, Voyage, Fire 2, 5 & HD 8, Surface 3, iPad
|
assigning styles to headings
i've been wanting that ability too. so where can you select from these subsets and do they have a center parameter included in any of them, and if so can you save that change as a default
Last edited by alansplace; 11-13-2011 at 02:25 PM. Reason: reword |
11-13-2011, 02:26 PM | #8 |
Zealot
Posts: 115
Karma: 10
Join Date: Jan 2011
Device: none
|
Thanks for all the help, it looks like i'll have to continue doing it manually.
|
11-13-2011, 05:36 PM | #9 | |
Bookmaker & Cat Slave
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
I think you didn't understand the answer. You simply assign the style to the h1, h2, etc. tags IN YOUR STYLESHEET, and it happens auto-magically--see the reply that Ducky gave you. You don't have to go through manually; that's what stylesheets (embedded or external) are for. Edited to add: P.S.: you might try Jutoh, which is a word-processing-like ePUB-maker, more in line with what you want, I think. It occurs to me that once these questions stop being about Sigil and start being about coding we need a way to move them to the appropriate forum, where folks could get more help on these types of basic items, like the ePUB forum. JS, whatcha think? Hitch Last edited by Hitch; 11-13-2011 at 05:47 PM. Reason: Added info about Jutoh |
|
11-14-2011, 04:41 AM | #10 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Basic CSS+HTML.
Say your CSS has a style that says: Code:
.calibre1 { color: red } Code:
<h1 class="calibre1">Chapter 1</h1> Code:
.calibre1, h1 { color: red } Of course, if you don't have anything with class="calibre1", you can just remove it and leave the style for h1 only: Code:
h1 { color: red } |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Chapter Headings | Paxman53 | Conversion | 3 | 10-12-2011 12:31 PM |
Why H1 and H2 Chapter Headings? | Ransom | Calibre | 11 | 08-10-2011 04:29 PM |
Shortcut for Headings? | elmago79 | Sigil | 1 | 07-04-2011 07:48 PM |
Nested headings? | crich70 | Sigil | 20 | 04-11-2011 10:44 AM |
Different font for headings | bremler | ePub | 4 | 03-11-2010 06:03 AM |