Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 12-10-2012, 09:11 PM   #16
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
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:
Originally Posted by Ripplinger View Post
I wanted to try this out and like Andy Sinden, was failing horribly. I put that line into every single style in my stylesheet.css and still had underscores.

Then I added this at the top of the TOC page only within <style> and </style> and it works:
a { text-decoration:none }

It's getting the underscore not from the style text but from the a in <a href...>. You could do it also adding a { text-decoration:none } to your stylesheet.css file as well and it will work (don't put the usual period before the a if you add it to your stylesheet, it won't work).
a, h1,p, div... are tags. They don't get a period, only class selectors get them.

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
theducks is offline   Reply With Quote
Old 12-10-2012, 09:30 PM   #17
Ripplinger
350 Hoarder
Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.
 
Ripplinger's Avatar
 
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 . My chapters that were underscored also had a <p class="Style3"> assigned, but I did not need to add the text-decoration:none to that style to hide the underscores.

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?
Ripplinger is offline   Reply With Quote
Advert
Old 12-10-2012, 09:40 PM   #18
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,569
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Ripplinger View Post
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?
Bingo!
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.
DiapDealer is offline   Reply With Quote
Old 12-11-2012, 06:53 AM   #19
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
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.
mrmikel is offline   Reply With Quote
Old 12-11-2012, 07:48 AM   #20
Andy Sinden
Member
Andy Sinden began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Dec 2012
Device: pc
Quote:
Originally Posted by theducks View Post
a, h1,p, div... are tags. They don't get a period, only class selectors get them.

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
Thanks again everyone, but I'm still struggling.

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
Andy Sinden is offline   Reply With Quote
Advert
Old 12-11-2012, 08:55 AM   #21
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
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>
Your example above shows how you can legally nest and 'stack' styles:

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;
}
would modify the pcaliber class by making these italic AND no text-decoration.

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
theducks is offline   Reply With Quote
Old 12-11-2012, 02:48 PM   #22
Ripplinger
350 Hoarder
Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.
 
Ripplinger's Avatar
 
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
}
Ripplinger is offline   Reply With Quote
Old 12-11-2012, 02:52 PM   #23
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
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.
mrmikel is offline   Reply With Quote
Old 12-13-2012, 04:53 AM   #24
Andy Sinden
Member
Andy Sinden began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Dec 2012
Device: pc
Quote:
Originally Posted by Ripplinger View Post
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
}
Many thanks Ripplinger. Not being the slightest bit technical this looks to be very helpful (exactly what to type and why). Got to go out and will try later on & let you know how it goes.
Andy Sinden is offline   Reply With Quote
Old 12-14-2012, 06:48 AM   #25
Andy Sinden
Member
Andy Sinden began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Dec 2012
Device: pc
Quote:
Originally Posted by Ripplinger View Post
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
}

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?
Andy Sinden is offline   Reply With Quote
Old 12-14-2012, 06:58 AM   #26
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
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.
mrmikel is offline   Reply With Quote
Old 12-14-2012, 07:24 AM   #27
Ripplinger
350 Hoarder
Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.
 
Ripplinger's Avatar
 
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?
Ripplinger is offline   Reply With Quote
Old 12-14-2012, 07:57 AM   #28
Andy Sinden
Member
Andy Sinden began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Dec 2012
Device: pc
Quote:
Originally Posted by Ripplinger View Post
<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?
Many thanks to Ripplinger and mrmikel. when I saw the code in pcalibre and pcalibre1 I could see that the text decoration was set to underline in both. I changed it to none, and it worked. I then deleted the bracketed text decoration:none lines I'd added to the MsoToc styles or classes and it still worked!!

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.
Andy Sinden is offline   Reply With Quote
Old 12-14-2012, 03:11 PM   #29
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
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.
mrmikel is offline   Reply With Quote
Old 12-14-2012, 03:22 PM   #30
Ripplinger
350 Hoarder
Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.
 
Ripplinger's Avatar
 
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.
Ripplinger is offline   Reply With Quote
Reply

Tags
remove underlines


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 05:39 AM.


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