svn: /phd/trunk/ docs/phd-guide/phd-guide.xml phpdotnet/phd/Highlighter/GeSHi.php
| From: | Christian Weiske | Date: | Thu, 26 Aug 2010 21:14:55 +0000 |
| Subject: | svn: /phd/trunk/ docs/phd-guide/phd-guide.xml phpdotnet/phd/Highlighter/GeSHi.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-7046@lists.php.net to get a copy of this message | ||
cweiske Thu, 26 Aug 2010 21:14:55 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=302828
Log:
tell people how to use a custom highlighter
Changed paths:
U phd/trunk/docs/phd-guide/phd-guide.xml
U phd/trunk/phpdotnet/phd/Highlighter/GeSHi.php
Modified: phd/trunk/docs/phd-guide/phd-guide.xml
===================================================================
--- phd/trunk/docs/phd-guide/phd-guide.xml 2010-08-26 19:21:25 UTC (rev 302827)
+++ phd/trunk/docs/phd-guide/phd-guide.xml 2010-08-26 21:14:55 UTC (rev 302828)
@@ -288,8 +288,63 @@
<para>That's all to say. This way you can render your own docbook files,
too.</para>
</section>
+
+ <section xml:id="render-custom">
+ <title>Customizing the rendering results</title>
+
+ <para>PhD lets you specify a number of options to customize the
+ generated documentation files. The following sections describe
+ some of them.</para>
+
+ <section xml:id="render-custom-highlighter">
+ <title>Source code highlighter</title>
+
+ <para>Part of the documentation of programming languages
+ is source code examples. PhD is able to colorize the source
+ code of many types.</para>
+
+ <para>By default, PhD uses the source code highlighter that
+ is built into PHP itself. It is only able to highlight PHP code
+ and nothing else.</para>
+
+ <para>If your documentation contains other types of source code
+ or markup, like XML, HTML, Javascript or any other language,
+ you should try the
+ <link xlink:href="http://qbnz.com/highlighter/">GeSHi</link>
+ highlighter that is shipped with PhD:</para>
+
+ <orderedlist>
+ <listitem>
+ <para>
+ Install GeSHi from the MediaWiki PEAR channel:
+ </para>
+ <screen><![CDATA[$ pear channel-discover mediawiki.googlecode.com/svn
+$ pear install mediawiki/geshi]]></screen>
+ </listitem>
+
+ <listitem>
+ <para>
+ Use the GeSHi syntax highlighting class when rendering your
+ documentation:
+ <screen><![CDATA[$ phd -g 'phpdotnet\phd\Highlighter_GeSHi' -d
phd-guide.xml]]></screen>
+ </para>
+ </listitem>
+ </orderedlist>
+
+ <para>If you have GeSHi version 1.1.x installed, you should use
+ the <literal>phpdotnet\phd\Highlighter_GeSHi11x</literal> highlighter,
+ which is adapted to GeSHi's new API.
+ </para>
+
+ <para>Apart from using the highlighter shipped with PhD, you
+ can build your own highlighters.</para>
+ </section>
+
+ </section>
+
</chapter>
+
<chapter xml:id="docbook-extensions">
<title>DocBook extensions</title>
Modified: phd/trunk/phpdotnet/phd/Highlighter/GeSHi.php
===================================================================
--- phd/trunk/phpdotnet/phd/Highlighter/GeSHi.php 2010-08-26 19:21:25 UTC (rev 302827)
+++ phd/trunk/phpdotnet/phd/Highlighter/GeSHi.php 2010-08-26 21:14:55 UTC (rev 302828)
@@ -30,7 +30,11 @@
* 2009. It will not work with geshi 1.1.x or 1.2.x.
*
* @example
- * phd -g 'phpdotnet\phd\Highlighter_GeSHi' -L en -P PEAR -f xhtml -o build/en -d
.manual.xml
+ * Install geshi:
+ * pear channel-discover mediawiki.googlecode.com/svn
+ * pear install mediawiki/geshi
+ * Use it:
+ * phd -g 'phpdotnet\phd\Highlighter_GeSHi' -L en -P PEAR -f xhtml -o build/en -d
.manual.xml
*
* @category PhD
* @package PhD_GeSHi