Mysterious underlining of autonumbered chapter

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
royj
Propeller Head
Posts: 71
Joined: Mon Feb 13, 2006 1:19 pm
Location: Fargo, ND
Contact:

Mysterious underlining of autonumbered chapter

Post by royj »

I'm using autonumbering for sections and chapters. The Auto-number format for the section heading style looks like "Part {secnum}: " For the chapter style it's "Chapter {chapnum}: "

When I output to Word, my section headings are fine, but in the chapter headings, the word "Chapter", the number, colon and trailing space are underlined. The rest of the heading is not. Nothing in the style definition for the chapter style says anything about underlining. (I opened the stylesheet in a text editor to check if anything funky was hidden there.)

Here's a section heading:
Image

And here's a chapter heading, with the mysterious underline:
Image

Using Flare 4, output target is Word.

The project was created in an earlier version of Flare, but this behavior didn't happen in version 3, when I first implemented autonumbering for sections and chapters.
Roy Jacobsen
Writing, Clear and Simple
Fargo, ND
royj@writingclearandsimple.com
http://rmjacobsen.squarespace.com
royj
Propeller Head
Posts: 71
Joined: Mon Feb 13, 2006 1:19 pm
Location: Fargo, ND
Contact:

Re: Mysterious underlining of autonumbered chapter

Post by royj »

Figured it out. I have a bookmark and my index entries at the top of each topic, at the beginning of the heading line. For reasons lost in the mists of history, I had put the bookmark first, followed by the index entries, at the beginning of the chapter topics. However, for the part topics (the sections), the index entries were first, and then the bookmark.

So there are two possible solutions:
1. Moving the index entry to the front of the bookmark.
2. Removing the underline attribute for the a element in the css (for printed targets).

It appears that something about the bookmark tag causes the autonumber entry in the printed output to be underlined. Why it does this now in version 4, when it worked fine in v3 is something for the dev team at MadCap to figure out; probably something to do with the fact that the bookmark is an anchor (<a>) tag. Anyway, I'm logging this as a bug. You should be able to put a bookmark at the top of a topic without having to worry about what it does to your autonumbered chapters and sections.
Roy Jacobsen
Writing, Clear and Simple
Fargo, ND
royj@writingclearandsimple.com
http://rmjacobsen.squarespace.com
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Mysterious underlining of autonumbered chapter

Post by KevinDAmery »

Does the anchor tag contain any content? If it does, that content will take on the style info from the anchor tag. What someone (I believe it was Lisa) suggested last week was to instead have the anchor not contain any content. Something like this:

<a name="Chapter1"></a><h1>System Setup</h1>
Until next time....
Image
Kevin Amery
Certified MAD for Flare
royj
Propeller Head
Posts: 71
Joined: Mon Feb 13, 2006 1:19 pm
Location: Fargo, ND
Contact:

Re: Mysterious underlining of autonumbered chapter

Post by royj »

I don't select any text when creating the bookmark; I just put the insertion point at the front of the heading and press Ctrl+Shift+K (or click Insert >> Bookmark).

Here's what a bookmark looks like in the raw text of a sample topic I created to test this:
<h2 class="Heading2"><a name="ChapterTopic"></a>Chapter Topic</h2>
The "<a name="ChapterTopic"></a>" is the bookmark.

When you view the topic in the XML Editor, with the non-print medium showing, it looks like this:

Image

With the print medium view, it's like this:

Image
Roy Jacobsen
Writing, Clear and Simple
Fargo, ND
royj@writingclearandsimple.com
http://rmjacobsen.squarespace.com
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Mysterious underlining of autonumbered chapter

Post by KevinDAmery »

That will happen in the XML editor because it shows you where the bookmarks are. You can turn that off in the view settings if you want, although I don't recommend it (I prefer to see where anchors are). They won't get displayed in the output, though.

Does the sample topic have the same incorrect underlining when you actually build the output? Or does it work correctly? Also, is this the same code setup as you have in your "real" topics, or is it different?
Until next time....
Image
Kevin Amery
Certified MAD for Flare
royj
Propeller Head
Posts: 71
Joined: Mon Feb 13, 2006 1:19 pm
Location: Fargo, ND
Contact:

Re: Mysterious underlining of autonumbered chapter

Post by royj »

The sample output has the same incorrect underlining.

This test project uses the same CSS as my main projects.

If I leave the bookmark out, there's no underline. If I insert something in front of the bookmark, like an index entry, there's no underline.
Roy Jacobsen
Writing, Clear and Simple
Fargo, ND
royj@writingclearandsimple.com
http://rmjacobsen.squarespace.com
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Mysterious underlining of autonumbered chapter

Post by doc_guy »

I turn off underlining for all <a> elements in my print styles. My printed targets aren't web pages, so they shouldn't look like web pages, in my opinion.
Paul Pehrson
My Blog

Image
royj
Propeller Head
Posts: 71
Joined: Mon Feb 13, 2006 1:19 pm
Location: Fargo, ND
Contact:

Re: Mysterious underlining of autonumbered chapter

Post by royj »

doc_guy wrote:I turn off underlining for all <a> elements in my print styles. My printed targets aren't web pages, so they shouldn't look like web pages, in my opinion.
If that works for you, great.

On the other hand, even a "print" target can be viewed online, and can have links (e.g. PDFs). In that case, I can see that someone might want a link that looks like a link.

In the present case, the formatting looks like a link, but it doesn't act like it, which is even worse than a link that doesn't look like one.
Roy Jacobsen
Writing, Clear and Simple
Fargo, ND
royj@writingclearandsimple.com
http://rmjacobsen.squarespace.com
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Mysterious underlining of autonumbered chapter

Post by LTinker68 »

royj wrote:<h2 class="Heading2"><a name="ChapterTopic"></a>Chapter Topic</h2>
Just out of curiosity, if you change the code order to the following, does it help?

Code: Select all

<a name="ChapterTopic"></a><h2 class="Heading2">Chapter Topic</h2>
Unfortunately, that might throw things off a tad with orphans and widows, but hopefully it won't happen since they're on the same line, code-wise, but there is a possibility that it could throw the orphan/widow break between the bookmark and the heading. Or if it does, then maybe you could put the bookmark after the closing </h2> tag instead of in front of it.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Mysterious underlining of autonumbered chapter

Post by doc_guy »

royj wrote:On the other hand, even a "print" target can be viewed online, and can have links (e.g. PDFs). In that case, I can see that someone might want a link that looks like a link.
Good point. I find myself sometimes still thinking in Flare 3.1 mode, with Word output that I then made PDF; There were too many ways my cross links could go wrong, so my PDFs didn't have any links users could click. But I can see that with direct-to-PDF from flare that things like Cross References and links could actually be useful now, so you need a way for users to tell that the link is there.

Hope Lisa's suggestion works for that.
Paul Pehrson
My Blog

Image
royj
Propeller Head
Posts: 71
Joined: Mon Feb 13, 2006 1:19 pm
Location: Fargo, ND
Contact:

Re: Mysterious underlining of autonumbered chapter

Post by royj »

LTinker68 wrote:Just out of curiosity, if you change the code order to the following, does it help?

Code: Select all

<a name="ChapterTopic"></a><h2 class="Heading2">Chapter Topic</h2>
Haven't tried it, and I'm not sure I will. For my project, where I have both bookmarks and index entries in all of the affected topics, it's just simpler to put the index entries in front of the bookmark.
Roy Jacobsen
Writing, Clear and Simple
Fargo, ND
royj@writingclearandsimple.com
http://rmjacobsen.squarespace.com
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Mysterious underlining of autonumbered chapter

Post by doc_guy »

what about a custom selector:

Code: Select all

h2 a {
     text-decoration:none;
}
This just removes underlines for anchor elements that are child elements in an <h2> element.

So it matches:

Code: Select all

<h2><a name="whatever">Title of H2</a></h2>
But doesn't match

Code: Select all

<p><a href="http://example.com">My link</a></p>
To me this sounds easier than changing the structure of all the topics that are already written.
Paul Pehrson
My Blog

Image
royj
Propeller Head
Posts: 71
Joined: Mon Feb 13, 2006 1:19 pm
Location: Fargo, ND
Contact:

Re: Mysterious underlining of autonumbered chapter

Post by royj »

Paul,
That might have worked, but I already made the necessary changes. :? (It wasn't that many topics.)
Roy Jacobsen
Writing, Clear and Simple
Fargo, ND
royj@writingclearandsimple.com
http://rmjacobsen.squarespace.com
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Mysterious underlining of autonumbered chapter

Post by doc_guy »

Just a thought: what will happen going forward? Are you the only editor, or are there others who will have to do this? Did you have to open the text editor, or could you do this in the XML editor?

If you are going to have to "fix" this each time in the future, it might be worth fixing it permanently in the style sheet so you never have to worry about it again.

Hope this helps. Glad you got it working in any case.
Paul Pehrson
My Blog

Image
royj
Propeller Head
Posts: 71
Joined: Mon Feb 13, 2006 1:19 pm
Location: Fargo, ND
Contact:

Re: Mysterious underlining of autonumbered chapter

Post by royj »

I'm the sole writer/editor here, so someone else hosing this up isn't a worry. But your point is taken. I've added your suggestion to my notebook and I'll be evaluating what I need to do to my CSS.

Bottom line on this episode: I don't think this is something I should have to worry about at all. This behavior is a bug; I submitted a bug report, so I hope that a future release will take care of it.
Roy Jacobsen
Writing, Clear and Simple
Fargo, ND
royj@writingclearandsimple.com
http://rmjacobsen.squarespace.com
Post Reply