Page 1 of 1

Cross References and Lists

Posted: Sun Sep 27, 2015 11:23 am
by lizat
Dear Madcaps,

I suspect this still isn't possible but can I get my list number from an ordered list to appear as a cross reference?
I remember years ago having to do a fiddle with autonumbering on a list but it was less than satisfactory. does anyone know of a way?

Thank you............................. liz

Re: Cross References and Lists

Posted: Mon Sep 28, 2015 1:19 am
by ChoccieMuffin
I know you can do it in Word so I remember in previous Flare versions trying to do the same, and I found a resounding NO. So I'll be very interested to see if anyone has since been able to find out how to do this. (As in, "Repeat steps 4 - 7" where 4 and 7 are cross-refs to the step numbers was what I was trying to do.)

Re: Cross References and Lists

Posted: Mon Sep 28, 2015 4:18 pm
by kkelleher
We've got a StepNumber cross-reference type, but you aren't going to like how we got there.....

The install process of our app is very convoluted. In the install docs, we rely heavily on things like "skip step 3 if you use version X of app server Y." This isn't possible with ordered lists in HTML (and I don't think Flare supports it in any output types). Why is that? Because the number shown in the HTML is generated on the fly when the page is loaded, not when Flare writes the XML or HTML itself.

The HTML for an ordered list is:

Code: Select all

<ol>
  <li>Item 1</li>
  <li>Item 2</li>
  <li>Item 3</li>
</ol>
Which renders as:
1. Item 1
2. Item 2
3. Item 3

So the browser interprets the OL and generates a number; at build time, there isn't a step number that Flare can reference; it has no idea whether a step is the first or the fifth.

Instead of OL (which we would prefer to use), we're using Flare's AutoNumber feature. In the XML, it looks like:

Code: Select all

<p class="Numbered" MadCap:autonum="1.">After completing .....</p>
In the output HTML, it looks like:

Code: Select all

 <td class="AutoNumber_p_Bullet" valign="top" data-mc-autonum="1.">After completing .....</td>
In the XML, the cross reference looks like:

Code: Select all

 (<MadCap:xref class="Step_Number" href="#step_add_driver_to_classpath">stepĀ 1</MadCap:xref>)
The HTML for the cross reference looks like:

Code: Select all

(<a class="Step_Number MCXref xref xrefStep_Number selected" href="#step_add_driver_to_classpath">stepĀ 1</a>)
I don't think there is a solution for cross references pointing to the numbers of items in an OL.

One side effect of using the AutoNumber feature is that, under the covers, Flare builds all our procedures as tables, which has some unintended consequences. So this is definitely a kludge.

Thanks, and apolgies if this is tl;dr,

Kristen