cross-reference format for webhelp output

This forum is for all Flare related Tips and Tricks.
Have a tip or trick you use while working in Flare? Share it here.
Post Reply
arnonbo
Propeller Head
Posts: 16
Joined: Sat Feb 11, 2012 8:58 am

cross-reference format for webhelp output

Post by arnonbo »

Hi,

I am running Flare V8.

I configured my cross-reference format for online output as follows: {i}{paratext}{/i}. In my output, however, this results in an hyperlink text that includes the entire text of the paragraph underneath the topic's heading (which is a H1, H2 etc. in my print output), So the link would be, for example: "see This topic explains how to etc. etc." rather than "see Topic Title".

Should I be using a different cross-reference format for online output? If so, which one would that be since I tried using some alternatives but they don't seem to work for me.

Any help would be very much appreciated!

Thanks

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

Re: cross-reference format for webhelp output

Post by LTinker68 »

arnonbo wrote:I configured my cross-reference format for online output as follows: {i}{paratext}{/i}. In my output, however, this results in an hyperlink text that includes the entire text of the paragraph underneath the topic's heading (which is a H1, H2 etc. in my print output)... Should I be using a different cross-reference format for online output? If so, which one would that be since I tried using some alternatives but they don't seem to work for me.
It's not that you're using paratext. It's where the bookmark is located. It sounds as though the bookmark was placed at the end of the heading instead of at the beginning. You might want to try moving it to the beginning of the heading and see if that works. Did you add the bookmark or just click on the heading in the xref screen to select it?
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
arnonbo
Propeller Head
Posts: 16
Joined: Sat Feb 11, 2012 8:58 am

Re: cross-reference format for webhelp output

Post by arnonbo »

Hi,

Actually, the heading does not have any bookmark. And if I understand it correctly, a bookmark is not required in order to insert a cross-reference to a topic (a bookmark would only be needed to create a cross-reference to a specific location within a topic)? So when creating the cross-reference, I simply select the topic - rather than a bookmark (or bookmarked heading).

I've been trying to tweak this in different ways, but so far to no avail...
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: cross-reference format for webhelp output

Post by LTinker68 »

It used to be that when you created a xref to another topic, Flare automatically opened that destination topic and inserted a bookmark and you had to save the modified topic. It doesn't seem to be doing that anymore, but I'm not sure when it changed (v8? v7?). I hadn't noticed it until you pointed it out.

I did just try it in my project in v8 with a xref format that has just {paratext} in the format and it worked to pull the content from the heading tag at the top of that topic and only the content from that heading tag.

Is your problem occurring with every topic you xref to, or is it only happening when you point to one specific topic? If it's the latter, I'd open that topic in the Internal Text Editor and see if there's anything going on in the topic code that might be screwing up the xref.

Do you see the problem in a test project created from scratch using the out-of-the-box xref format?
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
arnonbo
Propeller Head
Posts: 16
Joined: Sat Feb 11, 2012 8:58 am

Re: cross-reference format for webhelp output

Post by arnonbo »

Well, I tried this in a test project created from scratch and interestingly enough the problem does not occur. It only occurs in my existing project.

The only way can get this to work is by manuall inserting a bookmarkt at the topic's heading and then linking the cross-ref to that bookmark. But that's a rather cumbersome workaround. I will keep testing to see if I can figure out the issue - I wonder how my test project differs from my existing project. I will log a support call if I cannot figure it out.

Thanks for your help.

Arnon
arnonbo
Propeller Head
Posts: 16
Joined: Sat Feb 11, 2012 8:58 am

Re: cross-reference format for webhelp output

Post by arnonbo »

Hi

To add to my post above, the corss ref in my test project uses a full path, e.g. <MadCap:xref href="../C2/CH2a.htm">See "Title 2a" on page 1</MadCap:xref> while my existing project has a different format: p class="Bullet" MadCap:autonum="? ">See <MadCap:xref href="Test.htm"><i>Test</i> on page 1</MadCap:xref></p>.

Either way, I cannot figure it out :cry: . I will contact madcap support about this one.

Arnon
arnonbo
Propeller Head
Posts: 16
Joined: Sat Feb 11, 2012 8:58 am

Re: cross-reference format for webhelp output

Post by arnonbo »

Well, Im a step further with this one. Generating HTML output using the default stylesheets (styles.css) instead of my custom stylesheet generates the correct cross-reference format in the HTML output. If I modify the H1 style in my custom stylesheet and remove the mc-auto-number-position: outside-head; statement, then strangely enough this resolves the cross-reference format issue for one of my books, but not for all.

Any suggestions anyone?

ps: I'm still awaiting a response from Flare support.
arnonbo
Propeller Head
Posts: 16
Joined: Sat Feb 11, 2012 8:58 am

Re: cross-reference format for webhelp output

Post by arnonbo »

Solved this one. Removing the mc-auto-number-position: outside-head; statement from all heading styles results in a correct cross reference format. Took me over a days work tracking this one down.....

Arnon
sQuimby
Jr. Propeller Head
Posts: 6
Joined: Tue Nov 06, 2012 1:05 pm

Re: cross-reference format for webhelp output

Post by sQuimby »

To revive the old topic: I'm not sure if I'm experiencing the same issue, but when I create a cross-reference to a bookmark, rather than seeing the title of the bookmark I'm seeing the entire content of the header tag it's in (e.g. my bookmark is 'This thing,' the H1 field contains 'How to do this thing' and when I create a cross reference to the bookmark (NOT auto-generated from the heading tag) I see 'How to do this thing'). Per the previous post, I checked my mc-auto-number-offset and it was previously set to inside-head, and I even changed it to 'none,' but it still displays the entire contents of the heading tag regardless of that setting.

Ultimately, instead of writing in asides like 'if you'd like to see more, click here!' or '(see This topic),' I'd like to include 'in-line' references that read more naturally such as how Wikipedia links related topics--just click any Wikipedia entry and look for a link for an example of what I'm talking about. I tried creating a manual class for madcap|xref to allow this, but it still only appears to want to let me use variables like paratext, pageref, path, etc. From my understanding, the only way to actually write the references in a way that doesn't interrupt how I would actually like to write is by creating a custom style for each and every single reference with hard-coded text. Any suggestions on this? Is there there a way I could make cross-references work like this, or should I be using another feature? Any input (beside 'well just don't write like that!) is much appreciated.
sQuimby
Jr. Propeller Head
Posts: 6
Joined: Tue Nov 06, 2012 1:05 pm

Re: cross-reference format for webhelp output

Post by sQuimby »

Bump.

Any further advise on this? I don't want our help guide to read like a Yahoo News article from 2001, or alternatively, have to hard code and change every hard coded href. Halp?
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: cross-reference format for webhelp output

Post by LTinker68 »

I don't think you can set it to return the bookmark text, nor would you generally want to, since you can't add spaces in your bookmark, so you'd either have weirdly run-on text (configureTheScreen) or underscores (configure_the_screen). If you're just generating online output, then just use hyperlinks instead of xrefs. If you're generating online and print output, then you'll probably have to use a combination and condition the text. For example, I have something like the following in my topics:

The Code Reference section provides more information. See the Code Reference Appendix for more information.

The blue text is what shows up in the online output and has a hyperlink to another section in the help. The red text is what shows up in the print output and includes a xref. The colors represent the online-only and print-only condition tags, respectively.

Other times I'll have the following:

blah blah (see the Code Reference for more information)

In that case, I'm just using a xref tag, but the xref format in online output resolves to "Code Reference" and in print output resolves to "Code Reference on page x".
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Post Reply