Gentoo Archives: gentoo-portage-dev

From: Lionel Orry <lionel.orry@×××××.com>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] portage docbook documentation -> why not asciidoc ?
Date: Sat, 27 Nov 2010 12:29:18
Message-Id: AANLkTi=qP75_uRChJZjxWEKkyoD-KZbSibyU-1O30_qo@mail.gmail.com
In Reply to: Re: [gentoo-portage-dev] portage docbook documentation -> why not asciidoc ? by Sebastian Pipping
1 On Sat, Nov 27, 2010 at 10:25 AM, Sebastian Pipping <sping@g.o> wrote:
2 > On 11/26/10 21:18, Zac Medico wrote:
3 >> On 11/26/2010 08:32 AM, Lionel Orry wrote:
4 >>> Dear all,
5 >>>
6 >>> I just made a try to convert the portage documentation
7 >>> (http://dev.gentoo.org/~zmedico/portage/doc/) to asciidoc so that it
8 >>> would be easier to maintain and with a standard layout and style that
9 >>> is IMHO not bad and makes the doc easier to read. Are you interested?
10 >>>
11 >>> I attach the asciidoc sources, a tiny makefile and an already
12 >>> generated version in the 'portage.chunked' directory. All you need to
13 >>> generate the doc is 'emerge asciidoc'.
14 >
15 > What I have seen of the output looked awesome, the sources look clean.
16
17 [Lionel] Thanks, but please note that I did not customisation to the
18 standard style shipped with asciidoc. This default css is quite good
19 most of the time, but it's still interesting to know that a
20 customization layer is very easy to add, for example to get closer to
21 a gentoo style.
22
23 >
24 > I noticed that on the index page the table of contents are not as
25 > detailed as in the current version online.  Is that wanted or a
26 > limitation?  If the latter: is that a problem?
27
28 [Lionel] In fact you can customize the toc level with a 'toclevel'
29 attribute on the command-line, see the Makefile. I did several tries
30 but you can get the same level as the original doc with '-a
31 toclevels=4' if I remember well. In short, it's not a problem.
32
33 >
34 > On the conversion: did you come across any limitations?
35 > Anything that you were not able to map 1:1?
36 >
37
38 [Lionel] Indeed, a few things :
39
40 1. I must investigate how to include several tocs (one per each part)
41 as the original doc does. I think this is a matter of docbook backend
42 customization. Again, a customization layer is easy to add, we just
43 have to create a 'docbook.conf' file in the same directory as the
44 input 'portage.txt' file and only include overrides in it. I will do
45 it your team thinks it's worth looking deeper at switching to
46 asciidoc.
47
48 2. Only 5 section levels are allowed by asciidoc, most of the time
49 they are really enough, but it seems the portage documentation uses
50 many more nested levels (7 or maybe 8). So I tricked a bit by
51 replacing these section titles by stylized paragraphs (strong for
52 level 6 and emphasized (italic) for level 7. I can't remember if there
53 were level 8, if it was the case, I think I used a normal paragraph.
54 This implies a loss of semantics and not-that-good look and feel in my
55 opinion, but there's a good point for asciidoc: independently of the
56 backend/tool used to write a technical documentation, I feel like
57 using more than 5 levels of nesting shows that the doc has a problem.
58 It should either be restructured, or split in several documentations.
59 It's hard to follow the logic line of a doc that uses so many nested
60 levels. That's a personal opinion, and I don't consider myself a good
61 doc writer either.
62
63 One should note that sections is not the only way to structure the
64 doc. Lists (ordered, itemized and labeled (definition lists)) help a
65 lot in doing so, and both asciidoc and docbook allow to inserts
66 anchors on such elements so the cross-referencing is possible.
67
68 3. The multiple author issue explained below. One solution is already
69 given below, I will look at it deeper if it's not a loss of time.
70
71 >
72 >>> The only issue I had was including several authors, so this part is
73 >>> commented out. But if we stick to the docbook backend, we can include
74 >>> a docinfo file that solves the problem.
75 >>>
76 >>> Hope you'll find this useful...
77 >>
78 >> The asciidoc format seems nice, but personally, I think I prefer docbook
79 >> since the SGML/XML approach seems more flexible and extensible.
80 >
81 > Are you making use of that flexibility anywhere at the moment?  If not
82 > is such use planned for something specific?
83 >
84 > In case DocBook is keeping contributions down than cutting away certain
85 > flexibility to increase contributions could be a good trade-off, too.
86
87 [Lionel] I can only agree with you about that. Docbook is certainly a
88 very good standard, but writing xml does scare people and it is
89 probably a blocker for contributions. asciidoc (or other similar
90 formats like RST and such) helps contributions, it's like editing a
91 plain README. But one thing I don't know, is that whether that doc
92 asks for external contributions or is kept as an internal reference
93 and should only be taken care of by the devs.
94
95 >
96 >
97 >> Maybe
98 >> XML isn't quite as easy to read and edit, but it seems like a good
99 >> trade-off to me.
100 >
101 > I migrated the documentation of Layman from DocBook to AsciiDoc recently
102 > [1], because I noticed that the one reason I never really touched the
103 > documentation after taking Layman over (besides version upgrades) was
104 > DocBook.  And that despite the fact that I started using AsciiDoc only a
105 > few months ago (on the enum project [2]).
106
107 [Lionel] Thanks for sharing your ideas! In my case, I already helped
108 the waf project to migrate from docbook to asciidoc and its maintainer
109 is quite happy about the change. See
110 http://waf.googlecode.com/svn/docs/wafbook/single.html
111
112 Best regards,
113 Lionel
114
115 >
116 > Best,
117 >
118 >
119 >
120 > Sebastian
121 >
122 >
123 > [1]
124 > http://layman.git.sourceforge.net/git/gitweb.cgi?p=layman/layman;a=commitdiff;h=a8eee022c6dc2085d4e37e838ffb45404f77242b
125 > [2]
126 > http://git.fedorahosted.org/git/?p=enum.git;a=blob;f=man/enum.1.txt;hb=HEAD
127 >
128 >

Replies