DITA and XMetaL Discussion

XMetaL Community Forum DITA and XMetaL Discussion TopLeaf: Adding target page number to XREF in default TopLeaf transform

  • [email protected]

    TopLeaf: Adding target page number to XREF in default TopLeaf transform

    Participants 3
    Replies 4
    Last Activity 11 years, 5 months ago

    How do I add the target page number to an XREF when using the default TopLeaf transform?

    Thank you.

    Reply

    murray

    Reply to: TopLeaf: Adding target page number to XREF in default TopLeaf transform

    A recipe has been added to the TopLeaf Plugin How-to Guide describing how to do this. You can find it at [url=http://na.justsystems.com/webhelp/en/topleafplugin/6.0/TopLeafPlugin.html#How%20do%20I%20display%20the%20target%20page%20number%20in%20an%20XREF?]http://na.justsystems.com/webhelp/en/topleafplugin/6.0/TopLeafPlugin.html#How%20do%20I%20display%20the%20target%20page%20number%20in%20an%20XREF?[/url]

    Reply

    [email protected]

    Reply to: TopLeaf: Adding target page number to XREF in default TopLeaf transform

    My initial try at that recipe didn't result in the page number, but a comlpete listing of all the xrefs in the file, so I'll work on it and double-check to see if I hadn't commented-out something related to it.

    Reply

    murray

    Reply to: TopLeaf: Adding target page number to XREF in default TopLeaf transform

    I tried following the instructions in the recipe with a fresh copy of the default stylesheet and it worked fine for me. (I did notice that I missed a step in the recipe. In the mapping for tl:xrefline/tl:folio, on the Start Tag tab the format should be set to “inline”. If it is left as the default value, block, the page number will be displayed on the next line in your PDF doc. However, it is still displayed even if format is set to “block”. [I'll add that step to the recipe and repost it.])

    If you are unable to get the stylesheet working, you can zip the stylesheet folder and send it to [email protected] and I'll take a look at it. The stylesheet folder is found in c:Documents and SettingsAll UsersTopLeaf on Windows XP and c:ProgramDataTopLeaf on Windows Vista and Windows 7.

    Reply

    gjn2066

    Reply to: TopLeaf: Adding target page number to XREF in default TopLeaf transform

    I have revisited Murray's solution and realise it does not cater for every case. Creating TopLeaf variables to hold values such as page numbers is mostly fine, but DITA hrefs in particular contain relative paths which themselves may contain characters (such as space) which are not valid TopLeaf naming chars.

    Accordingly I am going to provide two new pre-built Perl functions which will make it easier to save/retrieve any value (not just page number) you want to associate with an id/href. I will initially make this available via the forum, but it will be a standard feature of the next plugin release.

    The existing functionality will be retained, but deprecated for future use.

    Reply

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

Lost Your Password?

Products
Downloads
Support