Pages: 1
Print
Author Topic: TopLeaf: Adding target page number to XREF in default TopLeaf transform  (Read 3728 times)
palmer@dst
Member

Posts: 56


« on: June 17, 2011, 10:13:05 AM »

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

Thank you.
« Last Edit: July 07, 2011, 03:15:16 PM by Derek Read » Logged

rpalmer
DST Systems, Inc.
murray
Member

Posts: 23


« Reply #1 on: June 17, 2011, 02:59:29 PM »

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

Posts: 56


« Reply #2 on: June 20, 2011, 06:38:32 AM »

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.
« Last Edit: June 20, 2011, 09:46:50 AM by palmer@dst » Logged

rpalmer
DST Systems, Inc.
murray
Member

Posts: 23


« Reply #3 on: June 20, 2011, 10:52:40 AM »

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 supportxmetal@justsystems.com and I'll take a look at it. The stylesheet folder is found in c:\Documents and Settings\All Users\TopLeaf on Windows XP and c:\ProgramData\TopLeaf on Windows Vista and Windows 7.
Logged
gjn2066
Member

Posts: 60


WWW
« Reply #4 on: September 27, 2011, 11:13:24 PM »

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.
« Last Edit: September 27, 2011, 11:19:27 PM by gjn2066 » Logged
Pages: 1
Print
Jump to: