Renaming Cross Reference

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
michaelm
Propeller Head
Posts: 52
Joined: Thu Sep 04, 2014 6:53 am

Renaming Cross Reference

Post by michaelm »

Hi all!
I am fairly new, so this may be simple, but I can't find instructions.
I have a cross reference to a topic like this

See prior year's Contract Comparison. (it automatically takes the title of the other topic, I am sure we have it set that way)

For this instance though, I just want the cross reference link to say Comparison, but still link to the Contract Comparison topic.

See prior year's Comparison.


Can't this be done easily? If I delete the word contract, it still shows up in the preview. Do I really have to make a whole new xref class? if so, link the flare instructions cause I can't find them.
Good times :)

Thanks
_____________________________________________________________________________________________________________________________________
Michael
"Quote me as saying I was misquoted."
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Renaming Cross Reference

Post by doc_guy »

This is the way cross references work.

If you don't want the exact title text displayed, then you need to either link your cross reference someplace else (you could create the text in a paragraph below the main title, and set the style of this paragraph to "display:none"), or use a standard link.
Paul Pehrson
My Blog

Image
michaelm
Propeller Head
Posts: 52
Joined: Thu Sep 04, 2014 6:53 am

Re: Renaming Cross Reference

Post by michaelm »

Cool, ok here's my next step.
Well, first here is what I did

<style>
p.hidden {display: none;}
</style>
<h1>Manual Contract Comparison</h1>
<p class="hidden">Comparison</p>

Then I used a Cross Ref linking to a bookmark at that spot at the word "Comparison".

Here's the thing (and this may be basic stuff by the way), how would my coworkers know not to delete that random word "Comparison" when they are in the XML editor for that linked topic?

Isn't there a way to make a Cross Reference style that allows you to name it whatever you want?

Again, sorry for basic questions
_____________________________________________________________________________________________________________________________________
Michael
"Quote me as saying I was misquoted."
ChoccieMuffin
Senior Propellus Maximus
Posts: 2650
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Renaming Cross Reference

Post by ChoccieMuffin »

If you don't want to use the exact text of the heading, try using a hyperlink instead of a cross-reference. (This might not work in print output and might not give page numbers - I always use x-refs so I can't be sure).

Alternatively, change the structure of the sentence that introduces a cross-reference. For ease, I never include the heading in the sentence, as you have. (This is for a number of reasons, one being that it might all fall apart grammatically if you ever translate your material, but also so I don't have to restrict myself when including the cross-reference.) So in your example sentence I would write something like: "For details of the prior year's comparison, see Contract Comparison."
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
Msquared
Propellus Maximus
Posts: 848
Joined: Mon Aug 06, 2012 10:19 am
Location: Southampton, UK

Re: Renaming Cross Reference

Post by Msquared »

It seems like a hyperlink would suit your purpose better than a cross-reference.

If you want to generate a link where the text shown for the link is derived from some attribute of the text you are referencing, and the text in the link gets automatically updated if the thing you are referencing changes, then you need a cross-reference. For example, if you want the linking text to always include the full heading title, or the section number, or the page number etc etc.

But if you want to be able to specify the link text yourself then you need to use a hyperlink. That allows you the level of control you want for the link text, but if the text you are linking to changes, the link text won't change automatically unless you change it yourself.

In HTML/HTML5 output, both of these are encoded as <a> - the difference is whether Flare has derived the link text for you based on the cross-reference style you applied, or whether your own link text is used.

Hope this helps.
Marjorie

My goal in life is to be as good a person as my dogs already think I am.
michaelm
Propeller Head
Posts: 52
Joined: Thu Sep 04, 2014 6:53 am

Re: Renaming Cross Reference

Post by michaelm »

Side note, a lot of people in my world call me msquared.

And yes, we want the link name to be able to change in case we change the title of the other topic.

I had decided if it was not possible, we would just have to rephrase the sentence to keep the link sort of separate. It's just a bit more clunky and not ideal (The title of the topic is also much more than the difference between "Comparison" and "Contract Comparison")


Thank you everyone for the responses!
_____________________________________________________________________________________________________________________________________
Michael
"Quote me as saying I was misquoted."
Msquared
Propellus Maximus
Posts: 848
Joined: Mon Aug 06, 2012 10:19 am
Location: Southampton, UK

Re: Renaming Cross Reference

Post by Msquared »

Another side note . . .

michealm - I can see why you're called msquared. In my case, my husband is also an "M". His granddad always used address us collectively M Squared when he wrote to us, in the days when relatives used to write to you using real paper and real ink. Since we have a really common surname, we used msquared for our first email address, since the addresses based on our real names were all taken. It's stuck, but now, if I try to register for something as msquared and find that's already taken, I'll know who has beaten me to it. ;-)
Marjorie

My goal in life is to be as good a person as my dogs already think I am.
michaelm
Propeller Head
Posts: 52
Joined: Thu Sep 04, 2014 6:53 am

Re: Renaming Cross Reference

Post by michaelm »

I love it!

by the way, I had a pen pal that I one wrote to with real ink and real paper. The good 'ol days. Spellcheck was a book called the dictionary!
_____________________________________________________________________________________________________________________________________
Michael
"Quote me as saying I was misquoted."
Post Reply