![]() |
#16 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,054
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
p.foo means ONLY P tags with a class of foo this would not apply to div class="foo" whereas a simple .foo would apply to both |
|
![]() |
![]() |
![]() |
#17 |
350 Hoarder
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,574
Karma: 8281267
Join Date: Dec 2010
Location: Midwest USA
Device: Sony PRS-350, Kobo Glo & Glo HD, PW2
|
Typically my stylesheets imported into Sigil for finishing up have never had a tag for <a> defined, never needed one. So if default is to underline, you need to add it obviously. Which being such a newb at this I didn't realize
![]() Although not sure I'd permanently use this, but I wanted to know how to do it. It's nice for on the PC and probably reading on tablets and on cell phones, but if you're reading on an e-ink reader, how would you know that the chapters are links without the underscore since they're not in color? |
![]() |
![]() |
Advert | |
|
![]() |
#18 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,569
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
![]() That's exactly why I always leave most links underlined. Maybe not really necessary in an html ToC (of course they're links, right?), but (foot|end)notes, chapter headers, and other links... ? That underline certainly helps on eInk screens. |
|
![]() |
![]() |
![]() |
#19 |
Color me gone
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
You could leave it off if you did it another way, like always putting links in brackets. But underlining is pretty universally understood to be links. And not all tables of contents are links. Sometimes if they are not already linked in the source I am using, I will leave it there, since the reader has its own TOC.
|
![]() |
![]() |
![]() |
#20 | |
Member
![]() Posts: 14
Karma: 10
Join Date: Dec 2012
Device: pc
|
Quote:
Tried adding it at the of the contents page and that didn't work, then to the classes in the style sheet and that hasn't worked either. This is what i now have in the style sheet, where do you think I've gone wrong? I've tried without the letter a, with { } brackets, and no format has worked so far. .MsoToc { display: block; font-family: "Arial", "sans-serif"; font-size: 1em; a text-decoration:none; margin-bottom: 5pt; margin-left: 0; margin-right: 0; margin-top: 0; } .MsoToc1 { display: block; font-family: "Arial", "sans-serif"; font-size: 1em; a text-decoration:none; margin-bottom: 5pt; margin-left: 11pt; margin-right: 0; margin-top: 0; } .MsoToc2 { display: block; font-family: "Arial", "sans-serif"; font-size: 1em; a text-decoration:none; margin-bottom: 5pt; margin-left: 40pt; margin-right: 0; margin-top: 0 A is a tag. you can't embed one class inside another style a { text-decoration: none } BTW the red above probably invalidated the style and the whole style was now ignored. Last edited by theducks; 12-11-2012 at 08:40 AM. Reason: BTW |
|
![]() |
![]() |
Advert | |
|
![]() |
#21 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,054
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Code:
<p class="MsoToc"><a class="pcalibre pcalibre1" id="toc">CONTENTS</a></p> MsoToc sets the overall pcalibre (probably) sets the basic anchor pcalibre1 (probably) tweaks the previous If pcalibre1 ONLY is used with anchors: Code:
.pcalibre1 { font-style: italic; text-decoration: none; } all other anchors (a) are normal IMHO if you are making ALL usages of pcalibre also with pcalibre1, then pcalibre should be changed... the code is simpler to follow and maintain |
![]() |
![]() |
![]() |
#22 |
350 Hoarder
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,574
Karma: 8281267
Join Date: Dec 2010
Location: Midwest USA
Device: Sony PRS-350, Kobo Glo & Glo HD, PW2
|
For Andy, the line that starts with "a" has to be its own style entry, not included in another style. So it should be:
.MsoToc { display: block; font-family: "Arial", "sans-serif"; font-size: 1em; margin-bottom: 5pt; margin-left: 0; margin-right: 0; margin-top: 0; } a { text-decoration: none } |
![]() |
![]() |
![]() |
#23 |
Color me gone
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
This illustrates the advantages and disadvantages of code that is nested. What controls something can be located at the beginning of the page or hidden in one of the multiple styles.
It might be easier to create a stylesheet just for your table of contents and get rid of the link to the overall stylesheet. Get rid of all the leftover Word styles in the TOC section and put in only what you really want in a stylesheet especially for it, copying only desired styling from the other stylesheet. Last edited by mrmikel; 12-11-2012 at 02:54 PM. |
![]() |
![]() |
![]() |
#24 | |
Member
![]() Posts: 14
Karma: 10
Join Date: Dec 2012
Device: pc
|
Quote:
|
|
![]() |
![]() |
![]() |
#25 | |
Member
![]() Posts: 14
Karma: 10
Join Date: Dec 2012
Device: pc
|
Quote:
Thanks Ripplinger, but I've added the lines as I think you've specified and it still hasn't worked. What I now have is as follows: .MsoToc { display: block; font-family: "Arial", "sans-serif"; font-size: 1em; margin-bottom: 5pt; margin-left: 0; margin-right: 0; margin-top: 0 } a { text-decoration: none } .MsoToc1 { display: block; font-family: "Arial", "sans-serif"; font-size: 1em; margin-bottom: 5pt; margin-left: 11pt; margin-right: 0; margin-top: 0 } a { text-decoration: none } .MsoToc2 { display: block; font-family: "Arial", "sans-serif"; font-size: 1em; margin-bottom: 5pt; margin-left: 40pt; margin-right: 0; margin-top: 0 } a { text-decoration: none } Is there an 'apply' button to make the changes in the code apply themselves? |
|
![]() |
![]() |
![]() |
#26 |
Color me gone
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
The changes in the code will show up if everything else is right, with the one exception of embedded font styles. This sort of thing happens when to me when I forget to link that particular section to the stylesheet, or if there is some minor mistake in the stylesheet. The mistakes in the stylesheet can be gotten rid of by using Tools to check the stylesheet.
The other time a change doesn't show up is when another change is active previous to it in the document covering the area in question, like a <div> at the top of the page covering the whole document, or a style statement at the beginning of the particular section. |
![]() |
![]() |
![]() |
#27 |
350 Hoarder
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,574
Karma: 8281267
Join Date: Dec 2010
Location: Midwest USA
Device: Sony PRS-350, Kobo Glo & Glo HD, PW2
|
<p class="MsoToc1"><a class="pcalibre pcalibre1" href="../Text/F%26S%20book%203.2%20bullet%20indents%20para%20spa cing%2C%20uline%20contents%20links%20removed_split _003.htm#_Toc342575597"><span class="calibre6">Introduction</span></a></p>
If this is his typical chapter link, would he need to add the text-decoration:none to pcalibre and pcalibre1 and MsoToc1 styles also? |
![]() |
![]() |
![]() |
#28 | |
Member
![]() Posts: 14
Karma: 10
Join Date: Dec 2012
Device: pc
|
Quote:
Haven't yet looked at how links throughout the rest of the book look now, but this has achieved what I wanted for the contents page, so many thanks for your patience and help. ![]() |
|
![]() |
![]() |
![]() |
#29 |
Color me gone
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
Your travails are why I prefer to start with a source that is as simple as possible. It is possible to set up something like Word to not make such complicated code, but I don't think that the normal template does that. All it is set up to do is make nice printed copy, and it doesn't matter how it does that so long as it prints nice.
I wish I could help you on Word, but know little about it. Toxaris does have a cleaning macro floating around here. Maybe that would be a good addition to your arsenal. Last edited by mrmikel; 12-14-2012 at 03:49 PM. |
![]() |
![]() |
![]() |
#30 |
350 Hoarder
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,574
Karma: 8281267
Join Date: Dec 2010
Location: Midwest USA
Device: Sony PRS-350, Kobo Glo & Glo HD, PW2
|
I try to keep the code as simple as possible too, so I'd try to never have 4 different styles called for in that instance. I'd probably make a new style for just the TOC with everything needed in the one style (style for MsoToc1 and pcalibre and pcalibre1 combined into one new style) so then you'd have that one "TOC" style and "a" only.
|
![]() |
![]() |
![]() |
Tags |
remove underlines |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Epub to PDF can't remove page breaks between headers | Vykan12 | Calibre | 11 | 07-25-2012 03:01 AM |
can i remove the cover image from the end of epub book? | granturissimus | Conversion | 2 | 11-14-2011 09:14 PM |
Remove first page of Calibre Converted epub | Run62 | Calibre | 2 | 08-03-2011 09:44 PM |
903 missing page numbers in table of contents (EPUB) | ANico | PocketBook | 4 | 05-19-2011 08:12 AM |
remove table of contents | cybmole | Calibre | 4 | 10-15-2010 10:21 AM |