]> sipb.mit.edu Git - ikiwiki.git/blob - doc/plugins/contrib/texinfo.mdwn
cb2bf038c95332aea7351d3080930b6d618c5b14
[ikiwiki.git] / doc / plugins / contrib / texinfo.mdwn
1 [[I|tschwinge]] started writing a plugin to render [Texinfo](http://www.gnu.org/software/texinfo/)
2 inside the ikiwiki environment.
3
4 The plugin is available at <http://www.schwinge.homeip.net/~thomas/tmp/texinfo.pm>.
5
6 It's very basic at the moment, but will be improved over time.
7
8
9 # Issues
10
11 ## N-to-M Mapping of Input and Output Files
12
13 Conventional ikiwiki [[*htmlize*ing|plugins/write#index6h3]] plugins
14 have a one-to-one mapping of input file and output file:
15 `some/where/page.mdwn` is rendered to `some/where/page.html`.
16 This can also be achieved for Texinfo files, but is somewhat
17 unusual there, when rendering them to HTML.  In general, there
18 is a N-to-M mapping:
19
20 * N Texinfo input files (a main `.texi` file,
21   several helper files (`fdl.texi`, `version.texi`, ...), and
22   additional text files which are included from the main `.texi`
23   file, e.g. `history.texi`, `libfoo.texi`, `libbar.texi`.
24 * M Texinfo output files: the main `.texi` file (which `include`s
25   the other input files) is usually rendered into a (flat) hierarchy
26   of HTML files, one file per node, see the table on
27   <http://www.gnu.org/software/texinfo/manual/texinfo/html_node/#Top>
28   for an example.
29
30 How to teach this to ikiwiki?
31
32 > As far as multiple input files, you'd need to use add_depends()
33 > to let ikiwiki know that a change to any of those files should cause a
34 > rebuild of the "main" file. I guess you'd also have to somehow deal with
35 > it wanting to render pages for each of the helper files. Not quite sure
36 > what the best way would be to avoid that.
37
38 > Ikiwiki is perfectly happy with a page creating other files (see eg, the
39 > img and teximg plugins, as well as the inline plugin's rss generation).
40 > The will_render() function supports that.
41
42 > What hasn't been done though is a page creating more than one other _page_.
43 > Perhaps you could call IkiWiki::genpage by hand for each additional page.
44 > You might also want to manipulate each data structure that tracks info about
45 > pages, adding the additional pages to them, so that they're first class
46 > pages that work as pages everywhere in ikiwiki (ie, can be inlined,
47 > appear in a site map, be linked to, etc). Not sure how to do that,
48 > and perhaps you could get away without doing it actually. --[[Joey]]
49
50 ## Copyright and Licensing Snippets
51
52 ikiwiki (obviously) doesn't understand (parse) the copyright and licensing
53 statements which are included in `.texi` files.
54
55
56 ## `makeinfo` Output
57
58 `makeinfo --html` is being used for rendering.  It creates stand-alone
59 HTML files, while ikiwiki only needs the files' `<body>`s.