You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Lukas Theussl (JIRA)" <ji...@codehaus.org> on 2009/04/28 15:38:46 UTC

[jira] Created: (MPDF-10) Support menu sub-items in table of contents

Support menu sub-items in table of contents
-------------------------------------------

                 Key: MPDF-10
                 URL: http://jira.codehaus.org/browse/MPDF-10
             Project: Maven 2.x PDF Plugin
          Issue Type: New Feature
            Reporter: Lukas Theussl


Currently, every source document starts a new chapter.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MPDF-10) Support menu sub-items in table of contents

Posted by "Data Nucleus (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MPDF-10?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=313509#comment-313509 ] 

Data Nucleus commented on MPDF-10:
----------------------------------

Hi Samuel, thx for your efforts to get this working again. How can I give your version a try? I've built your code (v 1.4-SNAPSHOT). Presumably I need a new version of the PDF plugin that uses this version? or are there other interdependencies that need updating too? 

FWIW My docs project is at
https://datanucleus.svn.sourceforge.net/svnroot/datanucleus/documentation/accessplatform.datanucleus.org/branches/maven3/

It has multiple levels of <item> in the pdf.xml, resulting in a 1000+ page PDF. A simple "mvn clean pdf:pdf" is all that is needed to run it. The TOC always has correct section numbers, yet the actual sections always end up wrong/inconsistent with the TOC.
                
> Support menu sub-items in table of contents
> -------------------------------------------
>
>                 Key: MPDF-10
>                 URL: https://jira.codehaus.org/browse/MPDF-10
>             Project: Maven 2.x PDF Plugin
>          Issue Type: New Feature
>            Reporter: Lukas Theussl
>
> Currently, every source document starts a new chapter.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MPDF-10) Support menu sub-items in table of contents

Posted by "Data Nucleus (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MPDF-10?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=302541#comment-302541 ] 

Data Nucleus commented on MPDF-10:
----------------------------------

Since this worked with Maven1 (pre-Doxia), I find it a bit odd on upgrading to Maven3 it is no longer a feature, so PDF's generated via Maven3 look stupid with the TOC listing things as 1.0, 1.1, 2.0, 2.1, 2.2 and the content listing things as 1.1, 2.1, 3.1, 4.1, 5.1 etc. Any idea on the complexity of this, and how long it would take to be implemented (given the time to do it)?

Alternatively, if I just want the TOC to just have top-level entries in them, is there any way of guaranteeing the ordering of sub items within these top level items?
                
> Support menu sub-items in table of contents
> -------------------------------------------
>
>                 Key: MPDF-10
>                 URL: https://jira.codehaus.org/browse/MPDF-10
>             Project: Maven 2.x PDF Plugin
>          Issue Type: New Feature
>            Reporter: Lukas Theussl
>
> Currently, every source document starts a new chapter.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MPDF-10) Support menu sub-items in table of contents

Posted by "Samuel Sjöberg (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MPDF-10?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=313433#comment-313433 ] 

Samuel Sjöberg commented on MPDF-10:
------------------------------------

I've forked doxia-doc-renderer on github in an attempt to fix this for FOP.

https://github.com/sasjo/maven-doxia-sitetools

I've changed the FoPdfRenderer to do a 2-pass rendering of the document. The first round is using the IndexingSink (from the TocMacro) and allows me to build a DocumentTOC where each configured chapter (i.e., document) has been extended to include the titles in the document. Things seems to work OK for the test cases and my real-word documents so far. Perhaps this could be a starting point for a full-on solution if not already sufficient as-is.
                
> Support menu sub-items in table of contents
> -------------------------------------------
>
>                 Key: MPDF-10
>                 URL: https://jira.codehaus.org/browse/MPDF-10
>             Project: Maven 2.x PDF Plugin
>          Issue Type: New Feature
>            Reporter: Lukas Theussl
>
> Currently, every source document starts a new chapter.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] (MPDF-10) Support menu sub-items in table of contents

Posted by "Data Nucleus (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MPDF-10?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=314346#comment-314346 ] 

Data Nucleus commented on MPDF-10:
----------------------------------

I've updated the way of reproducing this flaw :-

svn co https://datanucleus.svn.sourceforge.net/svnroot/datanucleus/documentation/accessplatform-maven-skin/trunk dn-maven-skin
cd dn-maven-skin
mvn clean install
cd ..
svn co https://datanucleus.svn.sourceforge.net/svnroot/datanucleus/documentation/accessplatform/trunk dn-project
cd dn-project
mvn clean pdf:pdf

This creates a PDF like
http://www.datanucleus.org/products/accessplatform_3_2/datanucleus-accessplatform-docs.pdf
which has section numbers correct in TOC, but not in the doc.


Alternatively if anyone can provide tips on where the problem lies in Doxia/PDF code then please add them here so someone could look at it if time.
                
> Support menu sub-items in table of contents
> -------------------------------------------
>
>                 Key: MPDF-10
>                 URL: https://jira.codehaus.org/browse/MPDF-10
>             Project: Maven 2.x PDF Plugin
>          Issue Type: New Feature
>            Reporter: Lukas Theussl
>
> Currently, every source document starts a new chapter.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MPDF-10) Support menu sub-items in table of contents

Posted by "Samuel Sjöberg (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MPDF-10?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=313547#comment-313547 ] 

Samuel Sjöberg commented on MPDF-10:
------------------------------------

It seems I've probably misinterpreted this defect. The solution I've built just takes an existing DocumentModel and expands each document that's included to build the TOC from actual contents. However it's still sitting in chapters based on the original configured TOC and I've done nothing explicit to handle nested, linked documents.

If you still want to try out my solution you can build my version of the maven-pdf-plugin. It has the dependency to my customized maven-doxia-sitetools
https://github.com/sasjo/maven-plugins/tree/trunk/maven-pdf-plugin

To try it out, first do mvn install for the maven-doxia-sitetools/doxia-doc-renderer, then mvn install on my maven-pdf-plugin. Then change groupId and version in your POM to point to the values in my projects.
                
> Support menu sub-items in table of contents
> -------------------------------------------
>
>                 Key: MPDF-10
>                 URL: https://jira.codehaus.org/browse/MPDF-10
>             Project: Maven 2.x PDF Plugin
>          Issue Type: New Feature
>            Reporter: Lukas Theussl
>
> Currently, every source document starts a new chapter.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira