PDF TOC, cross-reference, and vertical-align issues

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
milachar
Propeller Head
Posts: 17
Joined: Thu Feb 12, 2009 7:36 am
Location: Ontario

PDF TOC, cross-reference, and vertical-align issues

Post by milachar »

1. I created styles for my topic headings and modified their mc-heading-level property to get my print TOC, but now, in the text, these headings are indented according to their heading level. Is there a way to structure my TOC with the mc-heading level property, but not have the affected titles indented?

Based on where a topic is in my outline TOC, the h1 heading at the top of each topic was given a class of .headingleve1, .headinglevel2, ... "Use TOC depth for heading levels" is not checked.

If I were to check the "Use TOC depth for heading levels" option, I'd have to change what are currently h2, h3, and h4 (sub-headings in each topic) to some different class, and modify the h2, h3, h4, ... classes to look identical. However, my cross-references all have the format "{h1}". Would using TOC depth for heading levels affect this? That is, would I need to create different cross-reference classes for just the print output, depending on where the target topic is located in the TOC?

2. In my PDF output, the cross-references (which have the format "{h1} on page {page}") refer only to the h1.headinglevel1 titles, when sometimes the topic's title has the class h1.headinglevel4. The page number is correct and clicking on the cross-reference leads to the right page, but the incorrect title is there. How can I fix this?

3. In the PDF output, all text in <code> tags is a bit below the normal line. I have other text that has the vertical-align property set to middle, and this doesn't carry over to PDF. How can I work around this?

Thanks in advance!
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: PDF TOC, cross-reference, and vertical-align issues

Post by LTinker68 »

milachar wrote:1. I created styles for my topic headings and modified their mc-heading-level property to get my print TOC, but now, in the text, these headings are indented according to their heading level. Is there a way to structure my TOC with the mc-heading level property, but not have the affected titles indented?
Set margin-left values on the p.TOC1, p.TOC2, etc., styles in the stylesheet.
milachar wrote:If I were to check the "Use TOC depth for heading levels" option, I'd have to change what are currently h2, h3, and h4 (sub-headings in each topic) to some different class, and modify the h2, h3, h4, ... classes to look identical. However, my cross-references all have the format "{h1}". Would using TOC depth for heading levels affect this? That is, would I need to create different cross-reference classes for just the print output, depending on where the target topic is located in the TOC?
Why do you have {h1} in the xref format? If you're xref-ing to a topic, you can use the default xref tag or a variation of it. I think the default one says "see 'topic title' on page x"; you could create another xref that results in just "see 'topic title'". But the code to use isn't the heading level. I think it's {pageref}, but I don't have Flare open at the moment, so I can't be positive, but it's one of the options that appears in the edit cross-reference screen.
milachar wrote:2. In my PDF output, the cross-references (which have the format "{h1} on page {page}") refer only to the h1.headinglevel1 titles, when sometimes the topic's title has the class h1.headinglevel4. The page number is correct and clicking on the cross-reference leads to the right page, but the incorrect title is there. How can I fix this?
See above.
milachar wrote:3. In the PDF output, all text in <code> tags is a bit below the normal line. I have other text that has the vertical-align property set to middle, and this doesn't carry over to PDF. How can I work around this?
Are you using a different font for the code tags? If it's a different font then you may need to change its size or line-height so that it appears more even with the normal text.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
milachar
Propeller Head
Posts: 17
Joined: Thu Feb 12, 2009 7:36 am
Location: Ontario

Re: PDF TOC, cross-reference, and vertical-align issues

Post by milachar »

Thanks so much for your prompt reply!

1. Changing the left margins of the p.TOC# classes didn't do anything. I think it only affects those heading levels in the printed table of contents, not within the text.

My H1 headings at the top of each topic are in a one-row table with an icon in the left column (which has a fixed width). Apparently, the table style's width property set to 100% was doing something weird, even though all the text was left-aligned and the left column had a fixed with. Anyway, that fixed it!

2. I changed my cross-references from {h1} to {paratext} and that fixed the issue. Thanks! (However, I still don't understand why {h1} doesn't work for PDF, as it works fine for WebHelp.)

3. Yes, the code tag has a monospace font. I tried changing the line height and font size, but didn't see any changes in the PDF. I'll keep trying... Do you have any other ideas?
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: PDF TOC, cross-reference, and vertical-align issues

Post by LTinker68 »

milachar wrote:3. Yes, the code tag has a monospace font. I tried changing the line height and font size, but didn't see any changes in the PDF. I'll keep trying... Do you have any other ideas?
Are you doing the code samples as distinct blocks of text, or are you doing them inline in a paragraph?
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
milachar
Propeller Head
Posts: 17
Joined: Thu Feb 12, 2009 7:36 am
Location: Ontario

Re: PDF TOC, cross-reference, and vertical-align issues

Post by milachar »

Both.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: PDF TOC, cross-reference, and vertical-align issues

Post by LTinker68 »

With distinct blocks of text you wouldn't even notice the vertical alignment, so it's the inline code that's causing the problems. I think what you might need to do is create a custom paragraph class with a vertical align set to baseline or bottom or something. You apply that paragraph class to any paragraph that's going to have inline code examples. I'm assuming you're using a span tag around the code examples, so the span tag should honor the vertical align value set on the parent paragraph class. Just make sure you remove any vertical align and line height and other position-related attributes from that span class so that it inherits it all from the paragraph class.

Give that a shot and let me know if it works.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
milachar
Propeller Head
Posts: 17
Joined: Thu Feb 12, 2009 7:36 am
Location: Ontario

Re: PDF TOC, cross-reference, and vertical-align issues

Post by milachar »

Thanks for your ideas.

I tried modifying the vertical-align property of the surrounding text, but nothing changed. I'm using just the <code> tag for my monospace font, and when I copy its properties to a generic class (".mycode") nothing changes. The code class is set to inherit the vertical-align, bottom, top, and line-height properties.

It seems like the vertical-align property is simply ignored in PDF output.
milachar
Propeller Head
Posts: 17
Joined: Thu Feb 12, 2009 7:36 am
Location: Ontario

Re: PDF TOC, cross-reference, and vertical-align issues

Post by milachar »

In case this may help anyone in the future, with regards to my issue #2, here is a re-iteration of the problem and the best solution I found.

Each of my topics begins with an H1 header. For print output, when my cross-references use "{h1}" or "{title}," the H1 header or title of the topic with "mc-heading-level: 1" was used for all cross-references of its "child" topics. (For WebHelp or HTML Help, the cross-references were fine as they were.) Using "{paratext}" worked in both types of output and resulted in the correct topic titles, but it caused errors when building from the command line, since none of the H1 headers were bookmarked paragraphs, as they are supposed to be. The error was said something about a missing bookmark for every single cross-reference in the Temp. files.

I realized that I had set each topic whose H1 heading had the mc-heading-level property set to 1, as the start of a new chapter. So, the solution was simple: make every topic its own chapter.
Post Reply