XRef & Hyperlink formatting issue

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
SimonBunyard
Jr. Propeller Head
Posts: 3
Joined: Fri Nov 17, 2017 7:11 am

XRef & Hyperlink formatting issue

Post by SimonBunyard »

I'm trying to insert some hyperlinks in my online documents that link to both external websites and places in the document but I want the links to appear a certain way and this is where I'm having issues. I'm on Flare 2017 r3 for reference.

I want the links to appear as colour #2470E0 and not underlined in normal state. Same colour but underlined in hover state.

With hyperlinks I have the following styles,
a
a:active
a:focus
a:hover
a:link
a:visited

I've applied <a> to my hyperlinks but I can't seem to change the state of the underlining. The style a:link seems to be dictating to all other <a> styles. If I change a:link to underline on, all <a> styles become underlined. If I turn it off on a:link, it's off on all <a> styles. As above, I want underlining on some styles but not others.

So a colleague suggested trying xrefs. This seemed to work. However, now I'm getting an issue with editing the text that appears when building the xrefs.

I've got a section in the document called "Start and stop Enterprise".
One of my instructions is "Start Enterprise" while another is "Stop Enterprise". Both link to the section title above. When I come to build the document, both instructions get replaced with "Start and stop Enterprise" due to the {paratext} format command in xrefs.

Is there any way of turning this off so that I can specify my own text? If not, I'm happy to use hyperlinks, but then I get the issue above.

This is causing a big headache now, so I'm hoping someone here can help me out........if you've understood my waffle! :)
Nita Beck
Senior Propellus Maximus
Posts: 3669
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: XRef & Hyperlink formatting issue

Post by Nita Beck »

SimonBunyard wrote:I've got a section in the document called "Start and stop Enterprise".
One of my instructions is "Start Enterprise" while another is "Stop Enterprise". Both link to the section title above. When I come to build the document, both instructions get replaced with "Start and stop Enterprise" due to the {paratext} format command in xrefs.

Is there any way of turning this off so that I can specify my own text? If not, I'm happy to use hyperlinks, but then I get the issue above.
Welcome to the forums! :)

What Flare is doing is as designed. The whole point of using an xref is to have Flare take care of the "human readable" text. By design, Flare will fetch the text of the heading of the destination topic and use that for the human-readable link. There is no way to "turn off" this behavior. Even if you edit the human-readable text of an xref, it'll be overwritten the next time you build.

If you want to "hardcode" the human-readable text, use a hyperlink instead of an xref.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
SimonBunyard
Jr. Propeller Head
Posts: 3
Joined: Fri Nov 17, 2017 7:11 am

Re: XRef & Hyperlink formatting issue

Post by SimonBunyard »

Thanks for the reply Nita. That's fair enough, I don't mind using hyperlinks. But then I got the issue where all of the hyperlink <a> styles are underlined or all are not underlined. I only want a:hover to be underlined. Is that possible?

At the moment they seem to be governed by the a:link style. If I set that style as underlined, all <a> styles become underlined. If I take underlined off from a:link then its off on all. I can't toggle individual <a> styles for some reason :(
Nita Beck
Senior Propellus Maximus
Posts: 3669
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: XRef & Hyperlink formatting issue

Post by Nita Beck »

There is a certain order that link styles need to be defined in CSS. Generally, they must be defined in "LOVE-HA" order, that is, link, visited, hover, active. So, check the order you've got them in, rearrange if needed (by editing the stylesheet in Flare's Internal Text Editor or some other text editor), and see what happens. Hope that helps.

(Oh, not sure where focus should go. Perhaps there's some info at w3schools: https://www.w3schools.com/css/css_link.asp)
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Post Reply