Item8361: Enhancement: Add TOCTITLE parameter to GenPDFAddOn
Priority: Enhancement
Current State: Closed
Released In:
Target Release:
When generating PDFs with a table of contents, the TOC title is called "Table of Contents". To support internationalisation, it would be preferable to be able to adjust the TOC title. HTMLDOC supports the command line parameter
--toctitle
. I patched
GenPDF.pm
(
$VERSION = '$Rev: 2790 (28 Feb 2009) $';
) to add the setting
TOCTITLE
to
GenPDFAddOn's options (see attached
patch file). Note, however, that the code doesn't work if the TOC title contains spaces.
I also added some character encodings to translate various arrows from HTML encoding to text strings since they are not supported by HTMLDOC (→, ←, ↔, ⇒, ⇐, ⇔).
--
MartinKaufmann - 11 Dec 2009
Thanks for contributing this. If you have access to SVN, please feel free to commit these to the current SVN version, otherwise I'll incorporate them for you. Regarding spaces, the htmldoc documentation shows use of double-quotes to delimit the string with spaces. Have you tried adding quotes to get support for spaces?
--
GeorgeClark - 12 Dec 2009
On the command-line, the double quotes work. I haven't managed, however, to adjust the code so that these double quotes survive being processed by
Foswiki::Sandbox->sysCommand
. I assume that this is only due to my very limited understanding of Perl (which is also the reason it might be better not to give me access to SVN...).
--
MartinKaufmann - 14 Dec 2009