neysx       06/02/20 12:17:24

  Modified:    xml/htdocs/doc/en xml-guide.xml
  Log:
  #106017 Add colour coding to <pre>

Revision  Changes    Path
1.58      +79 -16    xml/htdocs/doc/en/xml-guide.xml

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
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
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

Index: xml-guide.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/xml-guide.xml,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- xml-guide.xml       9 Jan 2006 14:44:14 -0000       1.57
+++ xml-guide.xml       20 Feb 2006 12:17:24 -0000      1.58
@@ -1,11 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/xml-guide.xml,v 1.57 
2006/01/09 14:44:14 neysx Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/xml-guide.xml,v 1.58 
2006/02/20 12:17:24 neysx Exp $ -->
 <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
 
 <guide link="/doc/en/xml-guide.xml">
 <title>Gentoo XML Guide</title>
 
 <author title="Author">
+  <mail link="[EMAIL PROTECTED]">Xavier Neys</mail>
+</author>
+<author title="Author">
   <mail link="[EMAIL PROTECTED]">Daniel Robbins</mail>
 </author>
 <author title="Author"><!-- [EMAIL PROTECTED] -->
@@ -17,9 +20,6 @@
 <author title="Editor">
   <mail link="[EMAIL PROTECTED]">Sven Vermeulen</mail>
 </author>
-<author title="Editor">
-  <mail link="[EMAIL PROTECTED]">Xavier Neys</mail>
-</author>
 
 <abstract>
 This guide shows you how to compose web documentation using the new lightweight
@@ -32,8 +32,8 @@
 <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
 <license/>
 
-<version>2.29</version>
-<date>2005-10-13</date>
+<version>3</version>
+<date>2006-02-18</date>
 
 <chapter>
 <title>Guide basics</title>
@@ -247,7 +247,7 @@
 Make HTML/XML easier to read by using selective emphasis:
 &lt;foo&gt;&lt;i&gt;bar&lt;/i&gt;&lt;/foo&gt;
 
-&lt;comment&gt;(This is how to insert an inline note into the code 
block)&lt;/comment&gt;
+&lt;comment&gt;(This is how to insert a comment into a code 
block)&lt;/comment&gt;
 &lt;/pre&gt;
 
 &lt;note&gt;
@@ -280,7 +280,7 @@
 Make HTML/XML easier to read by using selective emphasis:
 &lt;foo&gt;<i>bar</i>&lt;/foo&gt;
 
-<comment>(This is how to insert an inline note into the code block)</comment>
+<comment>(This is how to insert a comment into a code block)</comment>
 </pre>
 
 <note>
@@ -353,15 +353,14 @@
 </section>
 <section>
 <title>
-  &lt;path&gt;, &lt;c&gt;, &lt;i&gt;, &lt;b&gt;, &lt;e&gt;, &lt;sub&gt; and 
&lt;sup&gt;
+  &lt;path&gt;, &lt;c&gt;, &lt;b&gt;, &lt;e&gt;, &lt;sub&gt; and &lt;sup&gt;
 </title>
 <body>
 
 <p>
 The <c>&lt;path&gt;</c>, <c>&lt;c&gt;</c>, <c>&lt;b&gt;</c>, <c>&lt;e&gt;</c>,
 <c>&lt;sub&gt;</c> and <c>&lt;sup&gt;</c> elements can be used inside any child
-<c>&lt;body&gt;</c> tag, except for <c>&lt;pre&gt;</c>. The <c>&lt;i&gt;</c>
-element can only be used inside <c>&lt;pre&gt;</c>. 
+<c>&lt;body&gt;</c> tag, except for <c>&lt;pre&gt;</c>.
 </p>
 
 <p>
@@ -387,11 +386,6 @@
 </p>
 
 <p>
-When you want to highlight some text as user input inside a 
<c>&lt;pre&gt;</c>, 
-use <c>&lt;i&gt;</c> instead.
-</p>
-
-<p>
 As you might have guessed, <c>&lt;b&gt;</c> is used to <b>boldface</b> some
 text.
 </p>
@@ -411,6 +405,75 @@
 </body>
 </section>
 <section>
+<title>Code samples and colour-coding</title>
+<body>
+
+<p>
+To improve the readability of code samples, the following tags are allowed
+inside <c>&lt;pre&gt;</c> blocks:
+</p>
+
+<dl>
+  <dt><c>&lt;i&gt;</c></dt>
+  <dd>Distinguishes user input from displayed text</dd>
+  <dt><c>&lt;comment&gt;</c></dt>
+  <dd>Comments relevant to the action(s) that appear after the comment</dd>
+  <dt><c>&lt;keyword&gt;</c></dt>
+  <dd>Denotes a keyword in the language used in the code sample
+  </dd>
+  <dt><c>&lt;ident&gt;</c></dt>
+  <dd>Used for an identifier
+  </dd>
+  <dt><c>&lt;const&gt;</c></dt>
+  <dd>Used for a constant
+  </dd>
+  <dt><c>&lt;stmt&gt;</c></dt>
+  <dd>Used for a statement
+  </dd>
+  <dt><c>&lt;var&gt;</c></dt>
+  <dd>Used for a variable
+  </dd>
+</dl>
+
+<note>
+Remember that all leading and trailing spaces, and line breaks in
+<c>&lt;pre&gt;</c> blocks will appear in the displayed html page.
+</note>
+
+<p>
+Sample colour-coded <c>&lt;pre&gt;</c> block:
+</p>
+
+<pre caption="My first ebuild">
+<comment># Copyright 1999-2006 <b>Gentoo Foundation</b>
+# Distributed under the terms of the GNU General Public License v2
+# &#36;Header: $</comment>
+
+<ident>DESCRIPTION</ident>=<const>"Exuberant ctags generates tags files for 
quick source navigation"</const>
+<ident>HOMEPAGE</ident>=<const>"http://ctags.sourceforge.net";</const>
+<ident>SRC_URI</ident>=<const>"mirror://sourceforge/ctags/<var>${P}</var>.tar.gz"</const>
+
+<ident>LICENSE</ident>=<const>"GPL-2"</const>
+<ident>SLOT</ident>=<const>"0"</const>
+<ident>KEYWORDS</ident>=<const>"~mips ~sparc ~x86"</const>
+<ident>IUSE</ident>=<const>""</const>
+
+<stmt>src_compile()</stmt> {
+    <keyword>econf</keyword> --with-posix-regex || <keyword>die</keyword> 
<const>"econf failed"</const>
+    <keyword>emake</keyword> || <keyword>die</keyword> <const>"emake 
failed"</const>
+}
+
+<stmt>src_install()</stmt> {
+    <keyword>make</keyword> <ident>DESTDIR</ident>="<var>${D}</var>" install 
|| <keyword>die</keyword> <const>"install failed"</const>
+
+    <keyword>dodoc</keyword> FAQ NEWS README
+    <keyword>dohtml</keyword> EXTENDING.html ctags.html
+}
+</pre>
+
+</body>
+</section>
+<section>
 <title>&lt;mail&gt; and &lt;uri&gt;</title>
 <body>
 



-- 
[email protected] mailing list

Reply via email to