I ran the test cases you linked to, inserted some System.out etc, and found
that it was because I was putting the toc macro after my first title.  If I
moved it forward, then it all works fine.

Thanks for the hint,  test cases rock, etc.

In testing I've come up with a few rules that need to be known when using
the Toc macro

 * toDepth can't be greater than the max depth of sections (kind of annoying
as you have to keep it in sync)
 * each section heading must be an anchor or the PDF generation fails.  The
APT parser doesn't error.  Not sure where the real problem is, once you know
it it's ok.  But trying to work out why the generation is failing takes alot
of trial and error.

Should I raise bugs for those issues?

David



Vincent Siveton wrote:
> 
> Hi David,
> 
> It should work, see the test case [1].
> However, as Lukas said, open a jira ticket so we could try to
> reproduce your problem.
> 
> Cheers,
> 
> Vincent
> 
> [1]
> https://svn.apache.org/repos/asf/maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/test/java/org/apache/maven/doxia/module/apt/AptParserTest.java
> #testTocMacro()
> 
> 2007/10/4, David Roussel <[EMAIL PROTECTED]>:
>>
>> Hi,
>>
>> I'm using doxia-maven-plugin 1.0-alpha-9 using APT as the input format.  
>> I
>> can get it to generate latex, pdf, xdoc, rtf, xhtml.
>>
>> However, if I try to use a macro as documented
>> (http://maven.apache.org/doxia/macros/index.html), like the example that
>> follows.  Then the macro is not expanded, it is just ignored.  Any ideas
>> for
>> fixes?
>>
>> Thanks
>>
>> David
>>
>> Example APT with macro....
>>
>>  ------
>> Title
>>  ------
>> John Smith
>> David Jones
>>  ------
>> 27 September 2007
>>  ------
>>
>> Title
>>
>> ~~ Use table of contents macro
>>
>> %{toc|section=2|fromDepth=0|toDepth=4}
>>
>> * Introduction
>>
>>   Blah blah blah blah blah blah blah blah blah blah...
>>
>> --
>> View this message in context:
>> http://www.nabble.com/apt-macro-in-doxia-book-not-working-tf4568267.html#a13038140
>> Sent from the Doxia - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/apt-macro-in-doxia-book-not-working-tf4568267.html#a13061296
Sent from the Doxia - Users mailing list archive at Nabble.com.

Reply via email to