Another potentially silly question, help appreciated.
My main target was PDF, and I'm now trying to produce Webhelp from the same source files. I've got confused over my cross-refs and the style changes I need to apply to them so that they work in both without me having to insert two cross-refs and condition them - that seems very silly to me, but for the moment it looks like the only bodge I can figure out.
In my PDF, I want the cross-ref to say "topic title on page 1". (I didn't realise I could have "see" included too, but that's fine, I've just included that in the regular text.) I have only used one cross-ref format when inserting, Madcap:xref.ConceptPageNumber, and in the Preview window in the Insert Cross-Reference dialog it shows as {i}{paratext}{/i} on page {page}, and in the stylesheet editor, mc-format = {i}{paratext}{/i} on page {page}
My problem is when I tried to modify the style in my webhelp stylesheet so that cross-refs look like links, i.e. blue and underlined (I modified the style so that it says {u}{paratext}{/u} in that preview window and mc-format = {u}{paratext}{/u} with color and border-bottom-color set as blue). I've managed to get myself very confused and I'm not sure what I need to do to fix this.
Here's what I have when I look at the topic with my PDF stylesheet as master, and layout (print), previewing the compiled topic:
Here's the same thing looking at it with WebHelp stylesheet as master and layout(web), previewing the topic:
And more worrying, here's the code:
What have I done wrong, and more to the point, what do I do to fix it?
(And the underline is also really far under the text so it doesn't LOOK like a link in a help file. Or am I being just too picky with that last one?)
Cross-refs confusion
-
ChoccieMuffin
- Senior Propellus Maximus
- Posts: 2650
- Joined: Wed Apr 14, 2010 8:01 am
- Location: Surrey, UK
Cross-refs confusion
You do not have the required permissions to view the files attached to this post.
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
-
techwriter31
- Propellus Maximus
- Posts: 551
- Joined: Wed Mar 05, 2008 10:50 am
Re: Cross-refs confusion
Instead of using the underline tags from the stylesheet editor, try using "text-decoration: underline;" in the text-based .css file.
For my projects, I use a single stylesheet for both print and web mediums. For the print medium, I specify the default print xref settings using the Madcap|xref style, then specify specific settings for the individual xref styles. Note that in the web version, I set the xref to exclude the "on page" text, as it's not applicable for web output.
For example:
---Print Medium---
MadCap|xref
{
text-decoration: none;
color: #000000;
}
MadCap|xref.Heading_Page
{
mc-format: '{paratext} on page {page}';
}
---Web Medium---
MadCap|xref
{
text-decoration: underline;
color: #0000ff;
}
MadCap|xref.Heading_Page
{
mc-format: '{paratext}';
}
For my projects, I use a single stylesheet for both print and web mediums. For the print medium, I specify the default print xref settings using the Madcap|xref style, then specify specific settings for the individual xref styles. Note that in the web version, I set the xref to exclude the "on page" text, as it's not applicable for web output.
For example:
---Print Medium---
MadCap|xref
{
text-decoration: none;
color: #000000;
}
MadCap|xref.Heading_Page
{
mc-format: '{paratext} on page {page}';
}
---Web Medium---
MadCap|xref
{
text-decoration: underline;
color: #0000ff;
}
MadCap|xref.Heading_Page
{
mc-format: '{paratext}';
}
Kellie
-
ChoccieMuffin
- Senior Propellus Maximus
- Posts: 2650
- Joined: Wed Apr 14, 2010 8:01 am
- Location: Surrey, UK
Re: Cross-refs confusion
Thanks for the underline thing, I'll do that.
As for the definition of mc-format, here's the style definition in the WebHelp CSS file (before fixing the underline, which I'll do):
MadCap|xref.ConceptPageNumber
{
border-bottom: solid 1px;
border-bottom-color: #0000ff;
color: #0000ff;
mc-format: '{paratext}';
And here's what it is in the PDF CSS file:
MadCap|xref.ConceptPageNumber
{
mc-format: '{i}{paratext}{/i} on page {page}';
}
So WHY do the cross-refs, which were inserted using the same class (but when different stylesheets were active), appear differently?
Is this just because I am using two different style sheets? Does this mean I HAVE to use mediums rather than stylesheets for things to work properly?
As for the definition of mc-format, here's the style definition in the WebHelp CSS file (before fixing the underline, which I'll do):
MadCap|xref.ConceptPageNumber
{
border-bottom: solid 1px;
border-bottom-color: #0000ff;
color: #0000ff;
mc-format: '{paratext}';
And here's what it is in the PDF CSS file:
MadCap|xref.ConceptPageNumber
{
mc-format: '{i}{paratext}{/i} on page {page}';
}
So WHY do the cross-refs, which were inserted using the same class (but when different stylesheets were active), appear differently?
Is this just because I am using two different style sheets? Does this mean I HAVE to use mediums rather than stylesheets for things to work properly?
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
-
lacastle
- Propellus Maximus
- Posts: 1028
- Joined: Thu Apr 12, 2007 7:28 am
- Location: Wilmington, DE
- Contact:
Re: Cross-refs confusion
Are you editing the print medium of the PDF stylesheet?
Do you have an xref setting for italics somewhere in the PDF stylesheet? that's the only difference, right? (other than the page number)
Do you have an xref setting for italics somewhere in the PDF stylesheet? that's the only difference, right? (other than the page number)
Laura A. Castle
http://www.lauracastle.com
http://www.lauracastle.com
-
ChoccieMuffin
- Senior Propellus Maximus
- Posts: 2650
- Joined: Wed Apr 14, 2010 8:01 am
- Location: Surrey, UK
Re: Cross-refs confusion
I'm not using specific mediums (or should that be media?) in the stylesheets, just default on all of them. I started trying to do mediums and then found I got in a terrible muddle with them, which is why I chose to go down the route of using a separate stylesheet for each target (2 x PDF of different sizes and fonts etc + 1 x webhelp).
The italics bit is working fine, as that's what I want in my PDF cross ref. The problem is that the "on page 1" doesn't automatically disappear when I generate output using the webhelp stylesheet, and that's because it's physically included in the topic, as you can see in the text editor screenshot I attached. Is this a bug, perhaps, or more likely I've set things up incorrectly in which case what should I have done. (If it means I have to do a search and replace through the doc to remove "on page 1" in the topics, so be it, but I do want my cross-refs to work in both mediums (media) without having to do any manual faffing.
The italics bit is working fine, as that's what I want in my PDF cross ref. The problem is that the "on page 1" doesn't automatically disappear when I generate output using the webhelp stylesheet, and that's because it's physically included in the topic, as you can see in the text editor screenshot I attached. Is this a bug, perhaps, or more likely I've set things up incorrectly in which case what should I have done. (If it means I have to do a search and replace through the doc to remove "on page 1" in the topics, so be it, but I do want my cross-refs to work in both mediums (media) without having to do any manual faffing.
Last edited by ChoccieMuffin on Thu Sep 23, 2010 6:40 am, edited 1 time in total.
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: Cross-refs confusion
Firstly, don't worry as you don't need to do anything, and in your actual output the xrefs will be correct - i.e. they'll follow the format set for the target/stylesheet.ChoccieMuffin wrote:So WHY do the cross-refs, which were inserted using the same class (but when different stylesheets were active), appear differently?
Is this just because I am using two different style sheets? Does this mean I HAVE to use mediums rather than stylesheets for things to work properly?
You hit on the reason in first post, the difference is just because you inserted the xrefs when a different target/stylesheet was set as the primary.
The actual text displayed for xrefs in the editor means nothing, take it with a pinch of salt; it's just a placeholder that's substituted by the actual xref text when you build the target.
The xref text in a topic will not change from when you first inserted it, so it'll probably soon get out of date; e.g. if the linked topic title changes, or your change the xref format. You can even manually edit the link text or delete it, but that will have no actual effect on the output.
If you want to check/preview the xref links before a build, you can update the xref text in a topic (for the current target/stylesheet), use Tools > Update Cross references.
-
ChoccieMuffin
- Senior Propellus Maximus
- Posts: 2650
- Joined: Wed Apr 14, 2010 8:01 am
- Location: Surrey, UK
Re: Cross-refs confusion
Dave, you're a genius and that makes me feel much better, thank you for your help. I'm now much happier. 
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: Cross-refs confusion
No worries, it's not obvious and I'd much prefer Flare to calculate the xref text dynamically (obviously page numbers wouldn't work).ChoccieMuffin wrote:Dave, you're a genius and that makes me feel much better, thank you for your help. I'm now much happier. 8)
At the very least it shouldn't allow you to edit the text, I've seen people doing that without realising it has no effect on the output.
-
John Owens
- Propeller Head
- Posts: 31
- Joined: Sun Aug 30, 2009 2:59 am
Re: Cross-refs confusion
Be aware that there is a serious bug here that I have reported.Dave Lee wrote:The actual text displayed for xrefs in the editor means nothing, take it with a pinch of salt; it's just a placeholder that's substituted by the actual xref text when you build the target.
If you want to check/preview the xref links before a build, you can update the xref text in a topic (for the current target/stylesheet), use Tools > Update Cross references.
If your cross-reference is pointing to a topic outide of the current TOC during generation, the Xref may not be updated automatically, as the Flare documentation says it should. 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.