Topics

Settings to enable generating TOC in a PDF?

timmc123456
 

Using the dita13 toolkit, is it possible to create a table of
contents that will appear in a PDF generated through FO?

If it _is_ possible, where is the setting to enable generating a
table of contents in a PDF?

For example, what would I need to change to get a table of contents
in the PDF for the demo.langref build, as in the DITA Language
Reference for version 1.2, DITALangRef.pdf?

Don R. Day <dond@...>
 

--- In dita-users@..., "timmc123456" <timmc123456@y...>
wrote:
Using the dita13 toolkit, is it possible to create a table of
contents that will appear in a PDF generated through FO?
There is some code for contents already in place in dita2fo_shell.xsl,
but the callouts for it are commented out--the routines have not been
adapted yet for the bookmap class-based lookups that are required for
book-like processing awareness (formatting chapters differently from
appendices, for example). I am able to get the form of a ToC to show,
but it needs more work. Back soon with more news, I hope.

The biggest thing in my way at the moment is a Java out-of-memory
message that abends the FOP process at about page 211. I have a 1G
RAM on the machine I'm testing with, so I'm not sure what causes this
limitation in the capabilities of my JVM. If anyone has insight into
this message, please give us all some insight!

--
Don Day
IBM Lead DITA Architect

Don R. Day <dond@...>
 

--- In dita-users@..., "Don R. Day" <dond@u...> wrote:

The biggest thing in my way at the moment is a Java out-of-memory
message that abends the FOP process at about page 211. I have a 1G
RAM on the machine I'm testing with, so I'm not sure what causes this
limitation in the capabilities of my JVM. If anyone has insight into
this message, please give us all some insight!
From watching the Windows Task Manager "PF Usage" meter, it is now
apparent that ant does not release memory between staged tasks. While
running the demo.langref project (which calls the dita.map.fo ant task
defined in ditatargets.xml), ant goes into the FOP task using whatever
the memory utilization was left at by the previous merge task, and
this simply exceeds the default 64M maximum memory size for a Java
process.

An easy solution is to issue this environment setting in your command
shell prior to running any memory intensive ant process:
D:&#92;dita13>set ANT_OPTS=-Xmx256m
Then you can directly run the demo.langref project without running
into the memory limit (at least for docs the size of the DITA Language
Reference -- about 250 pages). The 256 megabyte limit is just a
cap... perhaps 128 would do as well since this book was right at the
limit of the 64M default environment.

I'm still working on getting the ToC to generate correctly, but at
least I am able to get a PDF output that I was not getting before.

--
Don Day
IBM Lead DITA Architect