Where is the xref code?

This forum is for all Flare issues related to styles, stylesheets and XML.

Where is the xref code?

Postby chuck_agari on Mon Sep 30, 2019 11:58 am

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.
chuck_agari
Sr. Propeller Head
 
Posts: 225
Joined: Wed May 30, 2018 2:40 pm

Re: Where is the xref code?

Postby doloremipsum on Mon Sep 30, 2019 5:21 pm

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.
neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit - sed saepe cum dolor apud multos callidos mutuetur, reduci potest.
doloremipsum
Sr. Propeller Head
 
Posts: 114
Joined: Mon Aug 26, 2019 2:11 pm

Re: Where is the xref code?

Postby ChoccieMuffin on Wed Oct 02, 2019 2:42 am

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 2019r1.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
ChoccieMuffin
Senior Propellus Maximus
 
Posts: 2324
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Where is the xref code?

Postby chuck_agari on Wed Oct 02, 2019 11:38 am

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.
chuck_agari
Sr. Propeller Head
 
Posts: 225
Joined: Wed May 30, 2018 2:40 pm

Re: Where is the xref code?

Postby Chicago_HPT on Wed Oct 02, 2019 1:47 pm

.
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.
Chicago_HPT
Propeller Head
 
Posts: 84
Joined: Sun Feb 03, 2013 6:01 pm

Re: Where is the xref code?

Postby Nita Beck on Wed Oct 02, 2019 2:38 pm

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
Content Strategist / Information Architect / Flare Consultant: http://beck-communications.com
Manager, Rochester Flare User Group: http://www.facebook.com/RochesterFlareUserGroup
Nita Beck
Senior Propellus Maximus
 
Posts: 3331
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Where is the xref code?

Postby Chicago_HPT on Thu Oct 03, 2019 6:07 am

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
Chicago_HPT
Propeller Head
 
Posts: 84
Joined: Sun Feb 03, 2013 6:01 pm

Re: Where is the xref code?

Postby ChoccieMuffin on Thu Oct 03, 2019 6:47 am

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 2019r1.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
ChoccieMuffin
Senior Propellus Maximus
 
Posts: 2324
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Where is the xref code?

Postby Chicago_HPT on Thu Oct 03, 2019 7:33 am

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.
Chicago_HPT
Propeller Head
 
Posts: 84
Joined: Sun Feb 03, 2013 6:01 pm

Re: Where is the xref code?

Postby ChoccieMuffin on Thu Oct 03, 2019 10:10 am

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 2019r1.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
ChoccieMuffin
Senior Propellus Maximus
 
Posts: 2324
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK


Return to Styles, Stylesheets and XML

Who is online

Users browsing this forum: Google [Bot] and 4 guests