DITA and XMetaL Discussion
XMetaL Community Forum › DITA and XMetaL Discussion › TopLeaf: Adding target page number to XREF in default TopLeaf transform
-
[email protected] June 17, 2011 at 4:13 pm
TopLeaf: Adding target page number to XREF in default TopLeaf transform
June 17, 2011 at 4:13 pmParticipants 3Replies 4Last Activity 11 years, 9 months agoHow do I add the target page number to an XREF when using the default TopLeaf transform?
Thank you.
murray June 17, 2011 at 8:59 pm
Reply to: TopLeaf: Adding target page number to XREF in default TopLeaf transform
June 17, 2011 at 8:59 pmA 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]
[email protected] June 20, 2011 at 12:38 pm
Reply to: TopLeaf: Adding target page number to XREF in default TopLeaf transform
June 20, 2011 at 12:38 pmMy 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.
murray June 20, 2011 at 4:52 pm
Reply to: TopLeaf: Adding target page number to XREF in default TopLeaf transform
June 20, 2011 at 4:52 pmI 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.
gjn2066 September 28, 2011 at 5:13 am
Reply to: TopLeaf: Adding target page number to XREF in default TopLeaf transform
September 28, 2011 at 5:13 amI 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.
-
AuthorPosts
- You must be logged in to reply to this topic.