Thank you - this worked!

David

-----Original Message-----
From: Hussein Shafie [mailto:[email protected]] 
Sent: 22 October 2010 12:16
To: David Chance
Cc: John Dowgin; [email protected]
Subject: Re: [ditac] ditac support for page numbers

David Chance wrote:
>  
> 
> We are currently using ditac to generate our DITA documentation in PDF 
> form.  Whilst using XMLMind to generate the content, we are using 
> ditac from the command line as part of our build environment.
> 
>  
> 
> We are currently having problems with generating page numbers in the 
> output - none are being added to the final document.
> 
>  
> 
> Our command file is:
> 
>  
> 
> ..\..\dita\ditac-1_2_2\bin\ditac -keepfo ^
> 
> -vvv ^
> 
> -xslt2 pdf ..\..\catalogs\xsl\dovetail2fo.xsl ^
> 
> -toc ^
> 
> -p pdf-outline yes ^
> 
> -p number all ^
> 
> -p default-table-width 100% ^
> 
> -p title-page "SD_Advice_Element_Definitions.fo"  ^
> 
> -p footer-right "Confidential"  ^
> 
> -param footer-center "%page-number%"  ^
> 
> -p footer-left "Copyright (c) Dovetail Group, 2010" ^
> 
> -p header-left-image "dovetailsmall.jpg"  ^
> 
> -p body-top-margin "30mm"  ^
> 
> -filter ..\..\catalogs\filters\Full_External.ditaval ^
> 
> c:\temp\PageNoTest.pdf ^
> 
> ..\..\..\system_definition\Standard_Product\Functional\SDs\SD_Advice_E
> lement_Defintions.ditamap
> 
>  
> 
> And whilst everything else works, the center footer contains ''

My first idea is that the Windows Command Prompt interprets "%page-number%" as 
a reference to an environment variable called "page-number" and because this 
environment variable does not exist, Windows substitutes it with the empty 
string.

A workaround is to specify all your parameters into a local options file and 
then to run:

..\..\dita\ditac-1_2_2\bin\ditac -o my.options [...]

See -o or -options in
http://www.xmlmind.com/ditac/_distrib/doc/manual/commandLine.html

See the options file format in
http://www.xmlmind.com/ditac/_distrib/doc/manual/commandLine.html#commandLine__ditac_options_file

We'll consider implementing an alternate way to reference variables such as 
%page-number% (e.g. {page-number}) in the next release (ditac 2.0, which should 
fully support DITA 1.2, before the end of this year).







 
--
XMLmind DITA Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/ditac-support

Reply via email to