Gentoo Archives: gentoo-doc-cvs

From: Xavier Neys <neysx@×××××××××××.org>
To: gentoo-doc-cvs@l.g.o
Subject: [gentoo-doc-cvs] cvs commit: xml-guide.xml
Date: Mon, 20 Feb 2006 12:20:37
Message-Id: 200602201220.k1KCKE10009741@robin.gentoo.org
1 neysx 06/02/20 12:17:24
2
3 Modified: xml/htdocs/doc/en xml-guide.xml
4 Log:
5 #106017 Add colour coding to <pre>
6
7 Revision Changes Path
8 1.58 +79 -16 xml/htdocs/doc/en/xml-guide.xml
9
10 file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/xml-guide.xml?rev=1.58&content-type=text/x-cvsweb-markup&cvsroot=gentoo
11 plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/xml-guide.xml?rev=1.58&content-type=text/plain&cvsroot=gentoo
12 diff : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/xml-guide.xml.diff?r1=1.57&r2=1.58&cvsroot=gentoo
13
14 Index: xml-guide.xml
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/xml-guide.xml,v
17 retrieving revision 1.57
18 retrieving revision 1.58
19 diff -u -r1.57 -r1.58
20 --- xml-guide.xml 9 Jan 2006 14:44:14 -0000 1.57
21 +++ xml-guide.xml 20 Feb 2006 12:17:24 -0000 1.58
22 @@ -1,11 +1,14 @@
23 <?xml version="1.0" encoding="UTF-8"?>
24 -<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/xml-guide.xml,v 1.57 2006/01/09 14:44:14 neysx Exp $ -->
25 +<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/xml-guide.xml,v 1.58 2006/02/20 12:17:24 neysx Exp $ -->
26 <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
27
28 <guide link="/doc/en/xml-guide.xml">
29 <title>Gentoo XML Guide</title>
30
31 <author title="Author">
32 + <mail link="neysx@g.o">Xavier Neys</mail>
33 +</author>
34 +<author title="Author">
35 <mail link="drobbins@g.o">Daniel Robbins</mail>
36 </author>
37 <author title="Author"><!-- zhen@g.o -->
38 @@ -17,9 +20,6 @@
39 <author title="Editor">
40 <mail link="swift@g.o">Sven Vermeulen</mail>
41 </author>
42 -<author title="Editor">
43 - <mail link="neysx@g.o">Xavier Neys</mail>
44 -</author>
45
46 <abstract>
47 This guide shows you how to compose web documentation using the new lightweight
48 @@ -32,8 +32,8 @@
49 <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
50 <license/>
51
52 -<version>2.29</version>
53 -<date>2005-10-13</date>
54 +<version>3</version>
55 +<date>2006-02-18</date>
56
57 <chapter>
58 <title>Guide basics</title>
59 @@ -247,7 +247,7 @@
60 Make HTML/XML easier to read by using selective emphasis:
61 &lt;foo&gt;&lt;i&gt;bar&lt;/i&gt;&lt;/foo&gt;
62
63 -&lt;comment&gt;(This is how to insert an inline note into the code block)&lt;/comment&gt;
64 +&lt;comment&gt;(This is how to insert a comment into a code block)&lt;/comment&gt;
65 &lt;/pre&gt;
66
67 &lt;note&gt;
68 @@ -280,7 +280,7 @@
69 Make HTML/XML easier to read by using selective emphasis:
70 &lt;foo&gt;<i>bar</i>&lt;/foo&gt;
71
72 -<comment>(This is how to insert an inline note into the code block)</comment>
73 +<comment>(This is how to insert a comment into a code block)</comment>
74 </pre>
75
76 <note>
77 @@ -353,15 +353,14 @@
78 </section>
79 <section>
80 <title>
81 - &lt;path&gt;, &lt;c&gt;, &lt;i&gt;, &lt;b&gt;, &lt;e&gt;, &lt;sub&gt; and &lt;sup&gt;
82 + &lt;path&gt;, &lt;c&gt;, &lt;b&gt;, &lt;e&gt;, &lt;sub&gt; and &lt;sup&gt;
83 </title>
84 <body>
85
86 <p>
87 The <c>&lt;path&gt;</c>, <c>&lt;c&gt;</c>, <c>&lt;b&gt;</c>, <c>&lt;e&gt;</c>,
88 <c>&lt;sub&gt;</c> and <c>&lt;sup&gt;</c> elements can be used inside any child
89 -<c>&lt;body&gt;</c> tag, except for <c>&lt;pre&gt;</c>. The <c>&lt;i&gt;</c>
90 -element can only be used inside <c>&lt;pre&gt;</c>.
91 +<c>&lt;body&gt;</c> tag, except for <c>&lt;pre&gt;</c>.
92 </p>
93
94 <p>
95 @@ -387,11 +386,6 @@
96 </p>
97
98 <p>
99 -When you want to highlight some text as user input inside a <c>&lt;pre&gt;</c>,
100 -use <c>&lt;i&gt;</c> instead.
101 -</p>
102 -
103 -<p>
104 As you might have guessed, <c>&lt;b&gt;</c> is used to <b>boldface</b> some
105 text.
106 </p>
107 @@ -411,6 +405,75 @@
108 </body>
109 </section>
110 <section>
111 +<title>Code samples and colour-coding</title>
112 +<body>
113 +
114 +<p>
115 +To improve the readability of code samples, the following tags are allowed
116 +inside <c>&lt;pre&gt;</c> blocks:
117 +</p>
118 +
119 +<dl>
120 + <dt><c>&lt;i&gt;</c></dt>
121 + <dd>Distinguishes user input from displayed text</dd>
122 + <dt><c>&lt;comment&gt;</c></dt>
123 + <dd>Comments relevant to the action(s) that appear after the comment</dd>
124 + <dt><c>&lt;keyword&gt;</c></dt>
125 + <dd>Denotes a keyword in the language used in the code sample
126 + </dd>
127 + <dt><c>&lt;ident&gt;</c></dt>
128 + <dd>Used for an identifier
129 + </dd>
130 + <dt><c>&lt;const&gt;</c></dt>
131 + <dd>Used for a constant
132 + </dd>
133 + <dt><c>&lt;stmt&gt;</c></dt>
134 + <dd>Used for a statement
135 + </dd>
136 + <dt><c>&lt;var&gt;</c></dt>
137 + <dd>Used for a variable
138 + </dd>
139 +</dl>
140 +
141 +<note>
142 +Remember that all leading and trailing spaces, and line breaks in
143 +<c>&lt;pre&gt;</c> blocks will appear in the displayed html page.
144 +</note>
145 +
146 +<p>
147 +Sample colour-coded <c>&lt;pre&gt;</c> block:
148 +</p>
149 +
150 +<pre caption="My first ebuild">
151 +<comment># Copyright 1999-2006 <b>Gentoo Foundation</b>
152 +# Distributed under the terms of the GNU General Public License v2
153 +# &#36;Header: $</comment>
154 +
155 +<ident>DESCRIPTION</ident>=<const>"Exuberant ctags generates tags files for quick source navigation"</const>
156 +<ident>HOMEPAGE</ident>=<const>"http://ctags.sourceforge.net"</const>
157 +<ident>SRC_URI</ident>=<const>"mirror://sourceforge/ctags/<var>${P}</var>.tar.gz"</const>
158 +
159 +<ident>LICENSE</ident>=<const>"GPL-2"</const>
160 +<ident>SLOT</ident>=<const>"0"</const>
161 +<ident>KEYWORDS</ident>=<const>"~mips ~sparc ~x86"</const>
162 +<ident>IUSE</ident>=<const>""</const>
163 +
164 +<stmt>src_compile()</stmt> {
165 + <keyword>econf</keyword> --with-posix-regex || <keyword>die</keyword> <const>"econf failed"</const>
166 + <keyword>emake</keyword> || <keyword>die</keyword> <const>"emake failed"</const>
167 +}
168 +
169 +<stmt>src_install()</stmt> {
170 + <keyword>make</keyword> <ident>DESTDIR</ident>="<var>${D}</var>" install || <keyword>die</keyword> <const>"install failed"</const>
171 +
172 + <keyword>dodoc</keyword> FAQ NEWS README
173 + <keyword>dohtml</keyword> EXTENDING.html ctags.html
174 +}
175 +</pre>
176 +
177 +</body>
178 +</section>
179 +<section>
180 <title>&lt;mail&gt; and &lt;uri&gt;</title>
181 <body>
182
183
184
185
186 --
187 gentoo-doc-cvs@g.o mailing list