Where is the xref code?

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
chuck_agari
Sr. Propeller Head
Posts: 225
Joined: Wed May 30, 2018 2:40 pm

Where is the xref code?

Post by chuck_agari »

I'm doing some debugging of PDF output for a partner and their cross references are not the same as mine. I've not made any changes to the cross reference formats so in my HTML5 output my cross references turn into blue underlined links and in my PDF output my cross references turn into "see 'topic title' on page ##" text. In our partner's PDFs, however, the cross references just look like links. (I do not know that they did not convert cross reference code into link code, BTW).

In looking at MadCap's help, I'm directed to the internal CSS editor, which I almost never use. The relevant part is here:
xref.png
This is, theoretically, in my CSS file. However, when I open the file in VS Code, I see nothing looking like cross reference formatting. I search for "xref" and "mc-format" and find nothing. So where is the code for cross reference formatting stored?
You do not have the required permissions to view the files attached to this post.
doloremipsum
Sr. Propeller Head
Posts: 290
Joined: Mon Aug 26, 2019 2:11 pm

Re: Where is the xref code?

Post by doloremipsum »

That stylesheet is presumably using the default xref style (all of the fields in the stylesheet editor are greyed out, which indicates that they are being inherited from the defaults). It won't show up in the stylesheet in the same way that you do not need to have the defaults for the <p> tag in the stylesheet.

However, when you create an xref using Flare's editor, you do get a few preset style classes. I believe the most basic of these is just a link with the heading text. Presumably you and your partner make different choices when using that part of the editor. At any rate, you should be able to work out which xref class they are using and write whatever definition you want for that class in the stylesheet.
in hoc foro dolorem ipsum amamus, consectimur, adipisci volumus.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2632
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Where is the xref code?

Post by ChoccieMuffin »

I have this in my stylesheet (this is the PDF medium, the online medium is different):

Code: Select all

	MadCap|xref
	{
		mc-format: '{i}{paratext} {pageref}{/i}';
	}

	MadCap|xref.NoPageNum
	{
		mc-format: '{paratext}';
	}

	MadCap|xref.ConceptPageNumber
	{
		mc-format: '{i}{paratext}{/i}';
	}

	MadCap|xref.IndexPageNumber
	{
		mc-format: '{paratext}';
	}

	MadCap|xref.ListOfPageNumber
	{
		mc-format: '{paratext}';
	}

	MadCap|xref.TOCPageNumber
	{
		mc-format: '{paratext}';
	}
If you don't have it, then add it and make it look however you need it to look.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
chuck_agari
Sr. Propeller Head
Posts: 225
Joined: Wed May 30, 2018 2:40 pm

Re: Where is the xref code?

Post by chuck_agari »

ChoccieMuffin wrote:I have this in my stylesheet (this is the PDF medium, the online medium is different):

Code: Select all

	MadCap|xref
	{
		mc-format: '{i}{paratext} {pageref}{/i}';
	}

	MadCap|xref.NoPageNum
	{
		mc-format: '{paratext}';
	}

	MadCap|xref.ConceptPageNumber
	{
		mc-format: '{i}{paratext}{/i}';
	}

	MadCap|xref.IndexPageNumber
	{
		mc-format: '{paratext}';
	}

	MadCap|xref.ListOfPageNumber
	{
		mc-format: '{paratext}';
	}

	MadCap|xref.TOCPageNumber
	{
		mc-format: '{paratext}';
	}
If you don't have it, then add it and make it look however you need it to look.
Yeah, I know I can add it. Thing is, I don't define it specifically in our CSS, and nether does, as far as I can tell, our partner. So I want to figure out where the Flare defaults are defined so I can start there to figure out why our partner's cross references in the PDFs they are generating are different from ours.
Chicago_HPT
Sr. Propeller Head
Posts: 133
Joined: Sun Feb 03, 2013 6:01 pm

Re: Where is the xref code?

Post by Chicago_HPT »

.
I'm pretty sure the default xrefs are styled in the CSS stylesheet, if you want to edit them there.

Simplified View
madcap-flare-cssedit-simp-xref.png
Advanced View
madcap-flare-cssedit-adv-xref.png
But you can also insert a cross reference, or right-click an existing xref and select Edit Cross Reference. That displays the Insert Cross Reference dialog, where you can edit xref styles or create new ones.
madcap-flare-xref-editor.png
I hope that helps,
-jeff
You do not have the required permissions to view the files attached to this post.
Nita Beck
Senior Propellus Maximus
Posts: 3669
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Where is the xref code?

Post by Nita Beck »

chuck_agari wrote:Thing is, I don't define it specifically in our CSS, and nether does, as far as I can tell, our partner. So I want to figure out where the Flare defaults are defined so I can start there to figure out why our partner's cross references in the PDFs they are generating are different from ours.
This rings a teeny bell for me.

Question: Are you and you partner using the same version of Flare? Sometime several years back, MadCap changed the default format of xrefs. If you haven't explicitly defined xref formats in your project's stylesheet, what is inherited from your installation of Flare may be different from what is inherited from your partner's installation of Flare, assuming they are different -- by years.

This is probably not your issue, but thought I'd raise it anyway.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Chicago_HPT
Sr. Propeller Head
Posts: 133
Joined: Sun Feb 03, 2013 6:01 pm

Re: Where is the xref code?

Post by Chicago_HPT »

Also, sorry, I just re-read the original post and saw the part about not using the style sheet editor. That said, the Insert Cross Reference dialog is still an option for viewing and editing xref styles. And, yes, if desired, you can edit/modify the default style from there (for the current project).

Cheers,
-jeff
ChoccieMuffin
Senior Propellus Maximus
Posts: 2632
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Where is the xref code?

Post by ChoccieMuffin »

Chicago_HPT wrote:Also, sorry, I just re-read the original post and saw the part about not using the style sheet editor. That said, the Insert Cross Reference dialog is still an option for viewing and editing xref styles. And, yes, if desired, you can edit/modify the default style from there (for the current project).

Cheers,
-jeff
And if you do that, then any formatting there is entered in the topic as inline styling. The alternative is to add the styling you want to the stylesheet, and then it won't matter which version of Flare anyone is using.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Chicago_HPT
Sr. Propeller Head
Posts: 133
Joined: Sun Feb 03, 2013 6:01 pm

Re: Where is the xref code?

Post by Chicago_HPT »

ChoccieMuffin wrote:
Chicago_HPT wrote:... the Insert Cross Reference dialog is still an option for viewing and editing xref styles. And, yes, if desired, you can edit/modify the default style from there (for the current project)...
And if you do that, then any formatting there is entered in the topic as inline styling. The alternative is to add the styling you want to the stylesheet, and then it won't matter which version of Flare anyone is using.
I think there might be a misunderstanding. That may be true with older versions of Flare, before they updated the xref feature. In the last couple versions of Flare, however, when you edit an XRef class via the Insert Cross Reference dialog, you are editing the style class and saving it to a style sheet. It isn't inline formatting.
madcap-flare-xref-editor-2.png
Cheers,
-jeff
You do not have the required permissions to view the files attached to this post.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2632
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Where is the xref code?

Post by ChoccieMuffin »

Thanks Jeff. It's been a while since I've needed to edit my x-ref formatting.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Post Reply