DITA and XMetaL Discussion

XMetaL Community Forum DITA and XMetaL Discussion TOPLEAF: Cross-references do not include page numbers

  • jlm05

    TOPLEAF: Cross-references do not include page numbers

    Participants 0
    Replies 1
    Last Activity 10 years, 6 months ago

    When we generate PDFs, cross-references are hyperlinked, but do not include page numbers. If the PDF is printed, having a page number is necessary.

    For the xref tag in our stylesheet, the Custom tag content is:


    I took a quick look through the doc and didn't see any way to turn on the page numbers.

    Reply

    gjn2066

    Reply to: TOPLEAF: Cross-references do not include page numbers

    I should point out that the [u]Idref[/u] package you are using won't be officially released until the XMetaL 7 version of the plugin (real soon now), but here's a sneak preview.

    Assuming the target element has an id attribute, you “register” the target with either:

    • if the element is a topic (concept, task etc); or
    • if the element is within a topic (eg. a section).

    This creates a unique target from the filename and ID which (in the case of the first topic in a file) can also be reached using just the filename. It also allows you to set any number of “properties” associated with this target. These are just named strings that can be retrieved when needed. For example you could save the title of a target, then retrieve it whenever you make an xref to that target. So the text of the link is effectively self generating.

    However, you also get a folio (ie. page number) property for free (you don't have to set it yourself). This can be used as follows:

       
       
        on page {Idref-folio}

    where Idref-GetP retrieves the property PROP associated with the target and assigns it to the variable {Idref-PROP}.

    Let me know if this works, because if it doesn't I need to make an urgent fix to the XMetaL 7.0 plugin 😉

    Geoff

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support