Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Mylyn » Generating toc in pdf via WikiText and xslfo and fop
Generating toc in pdf via WikiText and xslfo and fop [message #892596] Thu, 28 June 2012 16:47 Go to next message
Tamar Cohen is currently offline Tamar CohenFriend
Messages: 100
Registered: July 2009
Senior Member
Hi Mylyn-world --

First of all, thank you HUGELY for WikiText. I've used it to create documentation to go along with the software I'm sending to the ISS for astronauts to use. Very cool.

Unfortunately they may prefer to read their documentation in a pdf format, and I'm having trouble figuring out how to generate a table of contents from WikiText to be included in the pdf help.

Here are my ant tasks for the pdf, pretty standard:

<target name="generate-xslfo" description="Generate xslfo from wikitext source">
<wikitext-to-xslfo markupLanguage="TracWiki"
targetdir="../${help_path}"
title="${title}"
version="${help_version}"
author="${author}">
<fileset dir="${basedir}/..">
<include name="${help_path}/*.tracwiki"/>
</fileset>
</wikitext-to-xslfo>
</target>

<target name="generate-pdf" depends="generate-xslfo" description="Generate pdf from wikitext source">
<exec executable="${fop.home}/fop">
<arg value="${basedir}/../${help_path}/${documentation_filename}.fo"/>
<arg value="${basedir}/../${help_path}/${title}.pdf"/>
</exec>
</target>

Is this supported? Any suggestions? I've found some suggestions here that indicate going through docbook as an intermediate format but I would like to avoid that ... http://www.peterfriese.de/advanced-wikitext/#high_2

thanks

Tamar
Re: Generating toc in pdf via WikiText and xslfo and fop [message #895585 is a reply to message #892596] Fri, 13 July 2012 16:58 Go to previous message
David Green is currently offline David GreenFriend
Messages: 135
Registered: July 2009
Senior Member
Tamar,

I'm glad that you're enjoying WikiText, and it's very exciting to hear
that it will help astronauts get into space!

Generation of PDF should create the normal PDF structure bookmarks[1].
This will enable PDF viewers to display a table of contents. If you
want a table of contents in the document content itself, then you should
take a look at the Textile language which has a markup extension[2]
{toc} for generating a table of contents in the document. If you're
happy with TracWiki, it's possible to extend the trac wiki format to add
support for generating a table of contents[3].

Regards,

David

fn1.
http://help.eclipse.org/juno/topic/org.eclipse.mylyn.wikitext.help.ui/help/Markup-Conversion.html?cp=31_1_3_1_0#PDFandXSLFO

fn2.
http://help.eclipse.org/juno/topic/org.eclipse.mylyn.wikitext.help.ui/help/Textile-Syntax.html?cp=31_1_4_1#TextileExtensions

fn3.
http://help.eclipse.org/juno/topic/org.eclipse.mylyn.wikitext.help.ui/help/Markup-Conversion.html?cp=31_1_3_4#MarkupLanguageCustomization

On 6/28/2012 9:47 AM, Tamar Cohen wrote:
> Hi Mylyn-world --
>
> First of all, thank you HUGELY for WikiText. I've used it to create
> documentation to go along with the software I'm sending to the ISS for
> astronauts to use. Very cool.
>
> Unfortunately they may prefer to read their documentation in a pdf
> format, and I'm having trouble figuring out how to generate a table of
> contents from WikiText to be included in the pdf help.
>
> Here are my ant tasks for the pdf, pretty standard:
>
> <target name="generate-xslfo" description="Generate xslfo from wikitext
> source">
> <wikitext-to-xslfo markupLanguage="TracWiki"
> targetdir="../${help_path}"
> title="${title}"
> version="${help_version}"
> author="${author}">
> <fileset dir="${basedir}/..">
> <include name="${help_path}/*.tracwiki"/>
> </fileset>
> </wikitext-to-xslfo>
> </target>
>
> <target name="generate-pdf" depends="generate-xslfo"
> description="Generate pdf from wikitext source">
> <exec executable="${fop.home}/fop">
> <arg
> value="${basedir}/../${help_path}/${documentation_filename}.fo"/>
> <arg value="${basedir}/../${help_path}/${title}.pdf"/>
> </exec>
> </target>
>
> Is this supported? Any suggestions? I've found some suggestions here
> that indicate going through docbook as an intermediate format but I
> would like to avoid that ...
> http://www.peterfriese.de/advanced-wikitext/#high_2
>
> thanks
>
> Tamar
>
Previous Topic:embedding Mylyn WikiText MarkupViewer
Next Topic:Review for Eclipse (R4E) 0.11.0 is now available
Goto Forum:
  


Current Time: Fri Dec 19 21:12:18 GMT 2014

Powered by FUDForum. Page generated in 0.01659 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software