View Single Post
Old 03-28-2014, 07:07 AM   #78
Julian Smart
Enthusiast
Julian Smart will become famous soon enoughJulian Smart will become famous soon enoughJulian Smart will become famous soon enoughJulian Smart will become famous soon enoughJulian Smart will become famous soon enoughJulian Smart will become famous soon enough
 
Posts: 28
Karma: 596
Join Date: Dec 2008
Device: none
Hi Bran,

This is tricky but one way might be to use Jutoh 2's ability to set a class name in Advanced Properties for text fragments, via the Format | Character command. You could set different class names for different parts of the link (different formatting will cause there to be separate fragments; or maybe separate them with a space with no link), and then address different classes separately in your CSS, e.g.

a.myClass:link

and define different formatting for each fragment.

Regards,

Julian

Quote:
Originally Posted by MacEachaidh View Post
Hi Julian,
Can you or others here please help me with a ToC issue?

It's not a problem with Jutoh, just that that's the environment I'm working in.

OK, so ... In the project I'm working on, I've formatted ToC items like this:

XX | Chapter Title

Where the whole line has a paragraph style applied to it, and the XX (which is the chapter number) has an over-riding character style applied to it, making it bold and a different typeface. This is to reflect the style of the chapter headings. Each item in the ToC has a link applied that leads to the relevant chapter. I tried applying the link manually to each item, and choosing to apply no new style to the link.

Is there any way to retain this formatting when the book is generated?

The two possible outcomes I have so far are:

1) If I leave it as-is, Jutoh seems to apply the URL style to each item anyway (blue text, bolded, underlined) and that's how it appears in the generated ePub. I know it's default for links in HTML, but it's not a look I particularly like.

2) I have this code I can apply as custom HTML:

Code:
a:link { color: black; text-decoration: none; }
a:visited { color: black; text-decoration: none; }
a:hover { color: black; text-decoration: none; }
a:active { color: black; text-decoration: none; }
which prevents the URL style fro being applied to the ToC items, but also eliminates the character formatting I've applied.

Is there a way I can keep the link active, but not change the formatting, of the ToC items when the ePub is generated?
Julian Smart is offline   Reply With Quote