Page 1 of 1

Text only cross reference?

Posted: Thu May 02, 2019 4:35 am
by crownjulesb
Hello all,
Is it possible to create a cross reference that pulls in the text content from the destination, but doesn't create a clickable link within the pdf or online output? I plan to turn some of the headings into togglers, but if they're already clickable links, then it might create a conflict. Or will creating a toggler override the cross ref code?
Has anyone got any tips?
Thanks. J

Re: Text only cross reference?

Posted: Thu May 02, 2019 4:56 am
by Nita Beck
Sorry in advance for being very brief.

You can achieve this by associating a condition with the xref format in your stylesheet and setting the condition action to unbind. Then exclude that condition in your target. Flare will leave the text but will remove the underlying link.

Re: Text only cross reference?

Posted: Thu May 02, 2019 4:07 pm
by doc_guy
That's a great tip, Nita. I wouldn't have thought of doing that.

-Paul

Re: Text only cross reference?

Posted: Fri May 03, 2019 12:35 am
by crownjulesb
I'm going to have to take that information step by step and see if I understand how to implement it! I may be back to clarify what you mean shortly! Thanks for the tips so far.

Re: Text only cross reference?

Posted: Sun May 05, 2019 7:11 am
by Nita Beck
Good news, bad news.

I spent a little time over the weekend crafting the solution for you. It involves creating a condition and then designing a new xref format that will be associated with that condition and whose "exclude action" will be set to "unbind". I got it all working, and then I noticed some very strange behavior. Bottom line is that I think there is a bug and I've now reported it to MadCap.

The strange behavior is this:

-- Say that in the default medium, the xref will look just like a link, e.g., See What's New. But in the medium used with PDF output (many people use the print medium; I create a medium called "PDF"), the xref will not look like a link but instead will have some words around it, e.g., See the "What's New" topic in the Help system.

-- If I have the XML Editor set to web layout and the xref there shows as "See What's New", when I generate the PDF, Flare is still supposed to use the longer format. But it doesn't. Only after I go back to the XML Editor, switch to print layout, and also refresh the xref by selecting Tools > Update Cross-References so that now we see the longer format, only then will Flare use the longer format in a freshly-generated PDF.

This is clearly buggy. I should not have to switch the XML Editor's view and refresh the xrefs on a topic-by-topic basis before building a PDF.

I haven't investigated enough to know if this has anything to do with the CSS or with how Flare is processing xrefs in general. Personally, I think this is a big deal. I've used this technique for years and have never before seen Flare not process the conditionalized xref formats as I designed them. I have some projects that have hundreds of xrefs that now I fear will not render correctly the next time I build PDFs.

Re: Text only cross reference?

Posted: Tue May 07, 2019 2:40 am
by crownjulesb
Many thanks for spending some time on this Nita.
To begin with it seems that it requires creating some very specific xref formats - which I've not tried yet - so I'll have to do a bit of practice on the side myself!
Let us know if the bug clears, as it still may be a way to create these types of refs.

I'll submit a feature request to madcap too. They might have a way to build this type of thing in at some point in the future.
:)

Re: Text only cross reference?

Posted: Tue May 07, 2019 3:44 am
by Nita Beck
MadCap has verified that it’s a bug: 149204.

Yes, please do also report this to put more weight behind it.

I also expressed my opinion (which I think does carry a little weight with MC, not meaning to sound arrogant) that I think this is a big bug, not some esoteric corner-case bug.

When I get a chance later today, I’ll go ahead and post my solution for you. It’s really not all that complicated. Too bad the bug popped up...