XRef Inquiry

This forum is for Single-Sourcing your Flare content to multiple outputs.
Post Reply
todd.richardson
Sr. Propeller Head
Posts: 187
Joined: Thu Aug 07, 2008 6:43 am
Location: Massachusetts

XRef Inquiry

Post by todd.richardson »

Hello,

I have two questions regarding XRefs, and both are related.

1). Is it possible to create an XRef style that generates a standard link in Online output, without changing the highlight (linked) text, yet generates a page reference link in Print output?

For example:
(Online): This is managed on the Scenarios page. (where 'page' is the linked text)
(Print, shown): This is managed on the Scenarios page, as described on page 42. (where 'page, as described on page 42' is the XRef link)
Image

2). Is it possible to define which words in an XRef are the active link?

For instance, in the example above, where page, as described on page 42 is the XRef link in print output, we would prefer only the page number (42) be the active link, and the remaining text (page, as described on page) look like the surrounding text. Is this possible?

Thanks in advance.
Todd Richardson
Engineering Team Lead – Customer Experience | IntervalZero

Windows 10, Flare 2020
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: XRef Inquiry

Post by NorthEast »

(1) You can have different xref styles for online and print outputs, just use a separate medium for each xref style; e.g. define the online xref style in the non-print (or default) medium, and the print xref style in the print medium. (Use the medium names that you use with each of your targets.)

So it'd look something like this...

Code: Select all

@media non-print
{
	MadCap|xref
	{
		mc-format: '{paratext}';
	}
}

@media print
{
	MadCap|xref
	{
		mc-format: '{paratext}, as described on page {page}';
	}
}

(2) Not that I know of.
Andrew
Propellus Maximus
Posts: 1237
Joined: Fri Feb 10, 2006 5:37 am

Re: XRef Inquiry

Post by Andrew »

Regarding 1), Dave is correct, but I would add that it will *still* replace your text. That's what xrefs do: they are like a "stand-in" for text to be inserted at compile time. So if you use the paratext or title proxies in your xref, the link will be the text from the link target (either the paragraph targeted, or the topic title).
Flare v6.1 | Capture 4.0.0
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: XRef Inquiry

Post by NorthEast »

Andrew wrote:Regarding 1), Dave is correct, but I would add that it will *still* replace your text. That's what xrefs do: they are like a "stand-in" for text to be inserted at compile time. So if you use the paratext or title proxies in your xref, the link will be the text from the link target (either the paragraph targeted, or the topic title).
Yep, if the question in (1) was can you manually edit (override) the xref text, a bit like inserting a normal hyperlink - then no you can't do that. The text you see in the editor for the xref is just a placeholder (it's not dynamic), and although the editor lets you change the xref text it will make no difference to the output, as the actual xref text is generated at build time according to the xref style you're using in that target.
todd.richardson
Sr. Propeller Head
Posts: 187
Joined: Thu Aug 07, 2008 6:43 am
Location: Massachusetts

Re: XRef Inquiry

Post by todd.richardson »

I figured that would be the answer - just thought I'd make sure. Thanks for the replies.
Todd Richardson
Engineering Team Lead – Customer Experience | IntervalZero

Windows 10, Flare 2020
todd.richardson
Sr. Propeller Head
Posts: 187
Joined: Thu Aug 07, 2008 6:43 am
Location: Massachusetts

Re: XRef Inquiry

Post by todd.richardson »

Update:

I played around with this some more and discovered that you can use style commands to effectively control which part of the XRef actually looks like a link.

For example, if I set the font color of the XRef text to match the color of text in the output (black, in our case), I can use the {color red} XRef command to change the color of a specific word or words in the XRef link. The wonderful aspect of the {color red} command is that you can use hex codes to define the color of the text, as shown in the capture below:

Image

Not sure when the {color red} command was added (it's missing from the Flare Print Output guide), but it's a lifesaver.
Todd Richardson
Engineering Team Lead – Customer Experience | IntervalZero

Windows 10, Flare 2020
John Owens
Propeller Head
Posts: 31
Joined: Sun Aug 30, 2009 2:59 am

Re: XRef Inquiry

Post by John Owens »

One thing to look out for is that Flare will not update your cross-reference automatically depending on which Medium is specified for the target, if the xref is pointing to a topic outide of the current TOC during generation. For example when you have two TOC and one only contains a subset of the topics, such as for a specific print target, and the other TOC includes all topics, such as for online output. It all depends on whether or not your Flare XML Editor was in the Medium Print mode when you created the Xref or updated the Xref. If it was not, then no matter which Medium you select for the Target it will use the default one instead. [Actually what happens is, the editor places some text in the topic's xref, this text (according to MadCap) is meaningless, as it (is supposed to be) replaced when the target is generated. However it is not when the xref is pointing to a topic in another TOC that is not included in the target's output.]

Topic 1 (includes 2 xrefs, one to Topic 2 and the other to Topic 3)
Topic 2
Topic 3

2 TOCs, one for online output including all 3 topics, and the other for print output which only includes Topic 1 and Topic 3

Online output uses the Default Medium; Print output uses the Print Medium

Xref definition for both default and Print mediums.

default medium - mc-format = '{i}{paratext}{/i}'
Print medium - mc-format = '{i}{/i}'

When you create Topic 1 (or update the Cross-references using Tools > Update Cross-References) if your Flare XML Editor was in Default Medium mode, then you are going to have serious problems, i.e., a link will be added for Topic 2 to the print output, however since Topic 2 does not exist in the TOC/Target for print output, the link will be broken. This is a bug with Flare, it does not update cross-references at output generation time like the documentation says it does.


However, if you "remember" to update the cross-reference and save it with the Flare XML Editor in Default Medium mode, then the links to external documents will not be shown. Sadly we cannot always count on our memories, hopefully this will be fixed soon, if everyone asks enough!
You do not have the required permissions to view the files attached to this post.
Post Reply