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 |
<foo><i>bar</i></foo> |
62 |
|
63 |
-<comment>(This is how to insert an inline note into the code block)</comment> |
64 |
+<comment>(This is how to insert a comment into a code block)</comment> |
65 |
</pre> |
66 |
|
67 |
<note> |
68 |
@@ -280,7 +280,7 @@ |
69 |
Make HTML/XML easier to read by using selective emphasis: |
70 |
<foo><i>bar</i></foo> |
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 |
- <path>, <c>, <i>, <b>, <e>, <sub> and <sup> |
82 |
+ <path>, <c>, <b>, <e>, <sub> and <sup> |
83 |
</title> |
84 |
<body> |
85 |
|
86 |
<p> |
87 |
The <c><path></c>, <c><c></c>, <c><b></c>, <c><e></c>, |
88 |
<c><sub></c> and <c><sup></c> elements can be used inside any child |
89 |
-<c><body></c> tag, except for <c><pre></c>. The <c><i></c> |
90 |
-element can only be used inside <c><pre></c>. |
91 |
+<c><body></c> tag, except for <c><pre></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><pre></c>, |
100 |
-use <c><i></c> instead. |
101 |
-</p> |
102 |
- |
103 |
-<p> |
104 |
As you might have guessed, <c><b></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><pre></c> blocks: |
117 |
+</p> |
118 |
+ |
119 |
+<dl> |
120 |
+ <dt><c><i></c></dt> |
121 |
+ <dd>Distinguishes user input from displayed text</dd> |
122 |
+ <dt><c><comment></c></dt> |
123 |
+ <dd>Comments relevant to the action(s) that appear after the comment</dd> |
124 |
+ <dt><c><keyword></c></dt> |
125 |
+ <dd>Denotes a keyword in the language used in the code sample |
126 |
+ </dd> |
127 |
+ <dt><c><ident></c></dt> |
128 |
+ <dd>Used for an identifier |
129 |
+ </dd> |
130 |
+ <dt><c><const></c></dt> |
131 |
+ <dd>Used for a constant |
132 |
+ </dd> |
133 |
+ <dt><c><stmt></c></dt> |
134 |
+ <dd>Used for a statement |
135 |
+ </dd> |
136 |
+ <dt><c><var></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><pre></c> blocks will appear in the displayed html page. |
144 |
+</note> |
145 |
+ |
146 |
+<p> |
147 |
+Sample colour-coded <c><pre></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 |
+# $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><mail> and <uri></title> |
181 |
<body> |
182 |
|
183 |
|
184 |
|
185 |
|
186 |
-- |
187 |
gentoo-doc-cvs@g.o mailing list |