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