conditional x-ref formats for PDF & WebHelp?
-
rlauriston
- Sr. Propeller Head
- Posts: 140
- Joined: Mon Dec 06, 2010 1:19 pm
conditional x-ref formats for PDF & WebHelp?
I'm single-sourcing to WebHelp and PDF. I want cross-references to appear as "see {paratext} on page {page}" in PDFs and as "see <link>{paratext}</link>" in WebHelp.
Is there some more elegant way to do this than inserting both and conditionalizing them? I've come across several discussions that suggest there is, but haven't found the details on how to actually do it.
Is there some more elegant way to do this than inserting both and conditionalizing them? I've come across several discussions that suggest there is, but haven't found the details on how to actually do it.
Re: conditional x-ref formats for PDF & WebHelp?
When you go to insert a xref, you can either select an existing format or create a new one. Either way, that xref format is added to the stylesheet file under MadCap|xref or a class of that style, depending on the format you selected. That style will appear in the default medium, which is the one the WebHelp output will use. In the Stylesheet Editor, switch to the print medium, select that xref tag or class of xref tag, and specify the format for that style for the print medium.
If you work with other languages, you'll need to specify the format in the language skin files.
If you work with other languages, you'll need to specify the format in the language skin files.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
-
rlauriston
- Sr. Propeller Head
- Posts: 140
- Joined: Mon Dec 06, 2010 1:19 pm
Re: conditional x-ref formats for PDF & WebHelp?
Thanks, that's just what I needed.
-
rlauriston
- Sr. Propeller Head
- Posts: 140
- Joined: Mon Dec 06, 2010 1:19 pm
Re: conditional x-ref formats for PDF & WebHelp?
I created a new xref format. Medium: (default) string is {color blue}{u}{paratext}{/u}{/color} and it looks the way I want in WebHelp.
Medium: Print string is {quote}{paratext}{quote} on page {page}, but it comes out blue and underlined. I tried changing the Properties settings to Default Color and Effects:Underline unchecked, but Flare changes them back.
Medium: Print string is {quote}{paratext}{quote} on page {page}, but it comes out blue and underlined. I tried changing the Properties settings to Default Color and Effects:Underline unchecked, but Flare changes them back.
-
rlauriston
- Sr. Propeller Head
- Posts: 140
- Joined: Mon Dec 06, 2010 1:19 pm
Re: conditional x-ref formats for PDF & WebHelp?
I added {default} to the beginning of the print medium string, and then the color and underline settings stuck. Whew.
-
rlauriston
- Sr. Propeller Head
- Posts: 140
- Joined: Mon Dec 06, 2010 1:19 pm
Re: conditional x-ref formats for PDF & WebHelp?
One odd thing, in the XML Editor the links display with the print format, even though WebHelp is the primary target. No big deal, though x-refs are more obvious in the editor if they display as links.
-
Nita Beck
- Senior Propellus Maximus
- Posts: 3672
- Joined: Thu Feb 02, 2006 9:57 am
- Location: Pittsford, NY
Re: conditional x-ref formats for PDF & WebHelp?
Use the Tool > Update Cross References command to have Flare rebuild the cross references as they should look for the primary target. (Yeah, I know... Flare should do this automatically when you change the primary target, but it doesn't.) I've just gotten used to not fretting about how the xrefs look in the XML Editor, so long as they render correctly in the generated PDF and Help targets.
Nita

RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
-
rlauriston
- Sr. Propeller Head
- Posts: 140
- Joined: Mon Dec 06, 2010 1:19 pm
Re: conditional x-ref formats for PDF & WebHelp?
Tools > Update Cross-References had no effect.
Re: conditional x-ref formats for PDF & WebHelp?
See the other post you created... I think it's the situation suggested by Will -- the XML Editor will only show the format of the xref based on which view you have the XML Editor set to, so if it's set to web view then you'll see the default (online) format. If you change it to print view then you should see the print version of the xref.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
-
ChoccieMuffin
- Senior Propellus Maximus
- Posts: 2650
- Joined: Wed Apr 14, 2010 8:01 am
- Location: Surrey, UK
Re: conditional x-ref formats for PDF & WebHelp?
A note of caution when using X-Refs, which means updating x-refs is a good idea. I have found sometimes that if I have a x-ref at the end of a sentence and then type a full stop (sorry, I'm English and that's what the little dot at the end of a sentence is called!) sometimes it gets included within the x-ref, so when the output is generated the full stop disappears. So now I re-generate all my x-refs whether I've changed the view or not.
Started as a newbie with Flare 6.1, now using Flare 2024r2.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Re: conditional x-ref formats for PDF & WebHelp?
Tip for you: after you insert the xref, look at the size of the blinking cursor. It should be a big, long vertical line (or, if there are other tags after it, a [ cursor). That tells you that you are outside of the character-level tag or you are inside the next tag (if it's a normal short cursor, or a ] cursor, you are still inside the xref tag).ChoccieMuffin wrote:A note of caution when using X-Refs, which means updating x-refs is a good idea. I have found sometimes that if I have a x-ref at the end of a sentence and then type a full stop (sorry, I'm English and that's what the little dot at the end of a sentence is called!) sometimes it gets included within the x-ref, so when the output is generated the full stop disappears. So now I re-generate all my x-refs whether I've changed the view or not.
If you see your cursor is the wrong one, you can use the arrow key (->) to move outside of the xref tags.
Flare v6.1 | Capture 4.0.0
-
ChoccieMuffin
- Senior Propellus Maximus
- Posts: 2650
- Joined: Wed Apr 14, 2010 8:01 am
- Location: Surrey, UK
Re: conditional x-ref formats for PDF & WebHelp?
Cheers, Andrew. I do now tend to use the right arrow after inserting a x-ref just to be sure, but I tend to re-do my x-refs whenever I open a topic I'm working on, just to be sure that the older stuff (where I might not have done so) is ok, and then I do a visual check.
Started as a newbie with Flare 6.1, now using Flare 2024r2.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Re: conditional x-ref formats for PDF & WebHelp?
Double-checking never hurts. 
Flare v6.1 | Capture 4.0.0