Skip to main content
Inspiring
January 29, 2024
Answered

Displaying the the number of an ordered list in a link

  • January 29, 2024
  • 3 replies
  • 720 views

I am using the RH 2022.3.0 (frameless).

I want to have one help topic containing a list of all my technical references. For example:

[1] Smith, John, Dummy's Guide to Physics. p 332.

[2] Jones, Sarah, Nature, Dec 2022, p3.

[3] Harington, Steve, "Atoms explained", p542.

 

I would like to use an ordered list, so that the numbers are automatic. And then, on other help topics, I want to provide links to those technical references. For example, I would like the following:

 

According to most physicists, atoms are real [3].

 

where the "[3]" is a link which takes you to the third entry of the page of references. Does anyone have any idea how to do this?

    This topic has been closed for replies.
    Correct answer JamesJim

    Well, I came up with a partial solution. Since RH allows me to create a cross-reference to a heading, and use the heading text as the text for the link, I decided to create my references page like this:

    [1]

    Smith, John, Dummy's Guide to Physics. p 332.

    [2]

    Jones, Sarah, Nature, Dec 2022, p3.

    [3]

    Harington, Steve, "Atoms explained", p542.

    Where each line is a heading 6 (<h6>). Then I found a trick that would remove the new line between the reference number and the reference text. In CSS:

     

    h6.RefMain {
    display:inline;
    }

     

    I could then create a cross reference to the number (since it is a heading). This has the downside that I can't use an ordered list, so if I ever insert new references that are not at the bottom, I will need to manually renumber the references. But at least the link text will be automatically updated if I change the number. 

    3 replies

    JamesJimAuthorCorrect answer
    Inspiring
    January 31, 2024

    Well, I came up with a partial solution. Since RH allows me to create a cross-reference to a heading, and use the heading text as the text for the link, I decided to create my references page like this:

    [1]

    Smith, John, Dummy's Guide to Physics. p 332.

    [2]

    Jones, Sarah, Nature, Dec 2022, p3.

    [3]

    Harington, Steve, "Atoms explained", p542.

    Where each line is a heading 6 (<h6>). Then I found a trick that would remove the new line between the reference number and the reference text. In CSS:

     

    h6.RefMain {
    display:inline;
    }

     

    I could then create a cross reference to the number (since it is a heading). This has the downside that I can't use an ordered list, so if I ever insert new references that are not at the bottom, I will need to manually renumber the references. But at least the link text will be automatically updated if I change the number. 

    Peter Grainge
    Community Expert
    Community Expert
    January 31, 2024

    Could you not make "atoms are real" the link to "Atoms Explained"? That would be the more normal method in the HTML world.

     

    Also the page numbering could change each time you generate as new content is added. Again page numbering is not the normal in the HTML world.

    ________________________________________________________

    My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

     

    Use menu (bottom right) to mark as Best Answer or to Highlight particularly useful replies. Found the answer elsewhere? Share it here.
    JamesJimAuthor
    Inspiring
    January 31, 2024

    @Jeff_Coatsworth I beg to differ about not seeing footnotes/endnotes online. For example, take a look at wikipedia. It puts the footnotes at the bottom of the page, but it is almost exactly what I want to do.  

    @Peter Grainge I think you are suggesting that instead of:

     

    According to most physicists, atoms are real [3].

    (where blue indicates the link)

     

    that I do this:

     

     

     

    According to most physicists, atoms are real.

     

    I don't think I could make it a cross-reference because the reference itself does not contain the words "atoms are real". I could make it a hyperlink though. To do this, I think I'd need to create a bookmark on my references page since RH does not support hyperlinks to the middle of the page. The problem with this is when a user clicks the link, it goes to "approximately" the desired location, but it is not precise (for example, if it is one of the links towards the bottom of the page, the user would see the bottom of the page but would not know which reference is the right one). That's why the number [3] is important.

     

    When I posted this, I thought that RH would have had a way to do this, since I see it done on various websites. But I see now that I was mistaken.

    Jeff_Coatsworth
    Community Expert
    Community Expert
    January 31, 2024

    I wouldn't hold Wikipedia up as typical HTML5 output - it's a structured Knowledge Base using MediaWiki as its programming.

    Jeff_Coatsworth
    Community Expert
    Community Expert
    January 29, 2024

    Think you probably want to use cross-references - see https://www.grainge.org/RoboHelp_Tour/rh2022/authoring/cross_refs_and_links.htm 

    JamesJimAuthor
    Inspiring
    January 29, 2024

    @Jeff_Coatsworth I looked at Cross-references, but I could not see a way to use the number. The closest I could find was:

    Type: Paragraph

    Format: Paragraph text

    But that gives me the entire text of the paragraph. I just want the number at the beginning (i.e., the number in the ordered list).

    Jeff_Coatsworth
    Community Expert
    Community Expert
    January 29, 2024

    Maybe stick a bookmark in & point the xref to that? I've never tried using any of this in my RH projects - the complicated one that does use xrefs all comes from Framemaker content (where it excels at this sort of stuff automatically since FM comes out of the book publishing world).