cvs: peardoc /en/guide/developers documentation.xml
| From: | Martin Jansen | Date: | Sun, 10 Nov 2002 10:38:37 +0000 |
| Subject: | cvs: peardoc /en/guide/developers documentation.xml | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-7345@lists.php.net to get a copy of this message | ||
mj Sun Nov 10 05:38:37 2002 EDT
Added files:
/peardoc/en/guide/developers documentation.xml
Log:
* Add documentation chapter.
# Not in the build for now.
Index: peardoc/en/guide/developers/documentation.xml +++ peardoc/en/guide/developers/documentation.xml <?xml version="1.0" encoding="iso-8859-1" ?> <!-- $Revision: 1.1 $ --> <chapter id="developers.documentation"> <title>Writing documentation</title> <titleabbrev>Documentation</titleabbrev> <sect1 id="developers.documentation.general"> <title>PEAR documentation</title> <titleabbrev>General</titleabbrev> <para> The documentation of PEAR (the <quote>PEAR Manual</quote>) is written in <ulink url="http://www.docbook.org/">Docbook XML</ulink>. This has certain advantages: <itemizedlist> <listitem> <simpara> The markup can be transformed into a number of different formats (like <acronym>HTML</acronym>, <acronym>PDF</acronym>, plain text). </simpara> </listitem> <listitem> <simpara> The structure of the documentation is clear to understand, because Docbook has been created exactly for the purpose of writing technical things like this manual. </simpara> </listitem> </itemizedlist> </para> </sect1> <!-- <sect1 id="developers.documentation.structure"> <title>The structure of the manual</title> <titleabbrev>Structure</titleabbrev> <para> This text is not yet written. </para> </sect1> --> <sect1 id="developers.documentation.testing"> <title>Testing and building the manual</title> <titleabbrev>Testing</titleabbrev> <sect2> <title>Required software</title> <simpara> The following passages have originally been written by Gábor Hojtsy, et al. as part of the PHP Documentation HOWTO. </simpara> <para> What tools you need depends on the operating system you use. Linux or some sort of Unix is recommended, although building the HTML versions of the PEAR Manual also work on Windows. </para> <para> In the following paragraphs, you will find information about obtaining and configuring the tools to build a HTML version of the manual. </para> </sect2> <sect2 id="tools-on-linux"> <title>Tools for Linux</title> <para> Although many tools are preinstalled on the majority of the Linux systems, we have collected some useful information about how they can be obtained and installed, if your system misses them. </para> <para> You also need <ulink url="&url.autoconf;">autoconf</ulink> to build the peardoc GNU configure script. Many distributions come with autoconf already installed. The latest copy can be found at: <itemizedlist> <listitem> <simpara><ulink url="&url.autoconf.ftp;">&url.autoconf.ftp;</ulink></simpara> </listitem> </itemizedlist> </para> <para> Apart from autoconf you will also need a number of other tools, which are desribed in the next paragraph. </para> </sect2> <sect2 id="tools-on-linux-obtaining"> <title>Obtaining the tools for Linux</title> <para> To simplify the installation process of the tools necessary to write PHP documentation, we have chosen to detail how to download and install the source RPMs from a sourceware mirror. You will need a working copy of <ulink url="&url.rpm;">RPM</ulink> installed. </para> <para> These tools are all separate packages and can be downloaded and installed directly from the author's websites if you want to. But be aware that we cannot provide information about compiling the original source codes. </para> <para> The RPMs with the necessary software can be downloaded from one of the following places: </para> <para> <itemizedlist> <listitem> <simpara> <ulink url="&url.docbookmirror1;">&url.docbookmirror1;</ulink> </simpara> </listitem> <listitem> <simpara> <ulink url="&url.docbookmirror2;">&url.docbookmirror2;</ulink> </simpara> </listitem> </itemizedlist> </para> <para> You will need to download the following files: <itemizedlist> <listitem><simpara>docbook-3.x-5.src.rpm</simpara></listitem> <listitem><simpara>jade-1.2.x-4.src.rpm</simpara></listitem> <listitem><simpara>jadetex-2.x-0.src.rpm</simpara></listitem> <listitem><simpara>psgml-1.2.x-1.src.rpm</simpara></listitem> <listitem><simpara>sgml-common-0.1-3.src.rpm</simpara></listitem> <listitem><simpara>stylesheets-0.10-2.src.rpm</simpara></listitem> </itemizedlist> </para> <para> These packages are updated from time to time. Please make sure you download the latest version available from the above sites (the actual file names may change, so if you find newer files than mentioned above, please <ulink url="mailto:pear-webmaster@php.net">report</ulink>, so we can update this list). </para> <note> <para> We currently use DocBook 3.1.7 (not the latest version) for writing peardoc files. We will probably update to Docbook 4 at a later point. </para> </note> </sect2> <sect2 id="tools-on-linux-installing"> <title>Installing the Tools</title> <para> If you downloaded all of the above files into a separate directory by themselves, simply issue the following command: </para> <para> <informalexample> <programlisting> $ rpm -Uvh *.rpm </programlisting> </informalexample> </para> <para> Or, you can issue them one by one in the following order: <informalexample> <programlisting> $ rpm -Uvh docbook-3.x-5.src.rpm $ rpm -Uvh jade-1.2.x-4.src.rpm $ rpm -Uvh jadetex-2.x-0.src.rpm $ rpm -Uvh psgml-1.2.x-1.src.rpm $ rpm -Uvh sgml-common-0.1-3.src.rpm $ rpm -Uvh stylesheets-0.10-2.src.rpm </programlisting> </informalexample> </para> <para> You should now have the necessary tools installed to edit and verify your PEAR documentation contributions. </para> </sect2> <sect2 id="tools-on-windows"> <title>Tools on Windows</title> <para> Although the peardoc environment is based on many Unix tools and techniques, there are ways to accomplish the same tasks on Windows. It is not too hard to set up a Windows working environment with CVS and the DocBook tools, but put away your mouse as you will need the keyboard for the majority of the tasks! :) </para> </sect2> <sect2 id="tools-on-windows-obtaining"> <title>Obtaining the tools for Windows</title> <para> You need the same tools as on Unix. </para> <para> To get it running on Windows, you'll need these tools: <itemizedlist> <listitem> <simpara> <ulink url="&url.win.cygwin;">Cygwin (bash for windows; it's huge...)</ulink> </simpara> </listitem> <listitem> <simpara> <ulink url="&url.jade;">Jade (the actual parser, take the windows binary dist)</ulink> </simpara> </listitem> <listitem> <simpara> <ulink url="&url.nwalsh;">Norman Walsh's modular DocBook stylesheets</ulink> </simpara> </listitem> <listitem> <simpara> <ulink url="&url.iso.entities;">Some ISO-entity declarations</ulink> </simpara> </listitem> </itemizedlist> </para> </sect2> <sect2 id="tools-on-windows-installing"> <title>Installing the Tools</title> <para> You need to download and install the Cygwin tools. Just select the "Install now!" link and run the supplied <filename>setup.exe</filename>. It will guide you through process of installation. These tools are port of standard Unix tools like sed, awk, autoconf, make, perl, ... for Windows. </para> <para> Run "Cygwin Bash Shell" command from the Programs menu (it will be added here by the previous step). Now you get a command line which behaves same as bash on Unix boxes. If you never worked with bash or Unix before, note that there are slashes (/) instead of backslashes (\) in paths. If you want to access the <literal>foo</literal> directory on drive <literal>c:</literal> write it as <literal>c:/foo</literal> instead of <literal>c:\foo.</literal> </para> <warning> <simpara> Do NOT use symlinks with Cygwin, it's buggy. (Jade doesn't like them, and the shell doesn't handle them very well either) </simpara> </warning> <para> Change to the dir where your peardoc snapshot is (or where you want to have it). Use, just like in Windows, the <literal>cd</literal> command. In Cygwin, the <literal>dir</literal> command is also supported. </para> <note> <simpara> If you decide to use another directory in one of the next steps, you'll probably need to modify <filename>peardoc/configure.in</filename> manually. We do not give any support if you are self-opinionated :) In this situation you can specify the DSSSL location manually by using the <literal>--with-dsssl=C:/path/to/dsssl</literal> option with configure. </simpara> </note> <para> Make sure that you are in the directory where the <literal>peardoc</literal> dir is located. (if you type <literal>ls</literal>, you should see <literal>peardoc</literal> listed). </para> <para> Type <literal>mkdir phpdoc-tools</literal>, and then unzip: <itemizedlist> <listitem><simpara>Jade to <literal>phpdoc-tools/jade</literal></simpara></listitem> <listitem><simpara>Norman Walsh's DSSSL files to <literal>phpdoc-tools/dsssl/docbook</literal></simpara></listitem> <listitem><simpara>the ISO-entities to <literal>phpdoc-tools/iso-entities</literal></simpara></listitem> </itemizedlist> XSL stylesheets are <emphasis>not necessary</emphasis> to generate the html versions of the manual, the DSSSL style sheets are used by default. If you think you would like to test XSL ones, than unzip Norman Walsh's XSL files to <literal>phpdoc-tools/xsl/docbook</literal>. See <ulink url="&url.nwalsh.xsl;">&url.nwalsh.xsl;</ulink> for more information and downloadable files. </para> <para> Now go to the <literal>peardoc</literal> directory, and execute: <informalexample> <programlisting> autoconf ./configure --with-lang=your_language_code </programlisting> </informalexample> Substitute <literal>your_language_code</literal> with a language code you checked out the files of, and would like to work on. The <literal>--with-lang</literal> parameter is optional. If you don't specify it, the default is <literal>en</literal> (English). </para> <para> If you didn't get any errors, you're ready to rock&roll. Otherwise, you could check out the <ulink url="&url.docbook.appa;">installation appendix</ulink> of "DocBook: The Definitive Guide". </para> </sect2> </sect1> </chapter> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->
Index: peardoc/en/guide/developers/documentation.xml +++ peardoc/en/guide/developers/documentation.xml <?xml version="1.0" encoding="iso-8859-1" ?> <!-- $Revision: 1.1 $ --> <chapter id="developers.documentation"> <title>Writing documentation</title> <titleabbrev>Documentation</titleabbrev> <sect1 id="developers.documentation.general"> <title>PEAR documentation</title> <titleabbrev>General</titleabbrev> <para> The documentation of PEAR (the <quote>PEAR Manual</quote>) is written in <ulink url="http://www.docbook.org/">Docbook XML</ulink>. This has certain advantages: <itemizedlist> <listitem> <simpara> The markup can be transformed into a number of different formats (like <acronym>HTML</acronym>, <acronym>PDF</acronym>, plain text). </simpara> </listitem> <listitem> <simpara> The structure of the documentation is clear to understand, because Docbook has been created exactly for the purpose of writing technical things like this manual. </simpara> </listitem> </itemizedlist> </para> </sect1> <!-- <sect1 id="developers.documentation.structure"> <title>The structure of the manual</title> <titleabbrev>Structure</titleabbrev> <para> This text is not yet written. </para> </sect1> --> <sect1 id="developers.documentation.testing"> <title>Testing and building the manual</title> <titleabbrev>Testing</titleabbrev> <sect2> <title>Required software</title> <simpara> The following passages have originally been written by Gábor Hojtsy, et al. as part of the PHP Documentation HOWTO. </simpara> <para> What tools you need depends on the operating system you use. Linux or some sort of Unix is recommended, although building the HTML versions of the PEAR Manual also work on Windows. </para> <para> In the following paragraphs, you will find information about obtaining and configuring the tools to build a HTML version of the manual. </para> </sect2> <sect2 id="tools-on-linux"> <title>Tools for Linux</title> <para> Although many tools are preinstalled on the majority of the Linux systems, we have collected some useful information about how they can be obtained and installed, if your system misses them. </para> <para> You also need <ulink url="&url.autoconf;">autoconf</ulink> to build the peardoc GNU configure script. Many distributions come with autoconf already installed. The latest copy can be found at: <itemizedlist> <listitem> <simpara><ulink url="&url.autoconf.ftp;">&url.autoconf.ftp;</ulink></simpara> </listitem> </itemizedlist> </para> <para> Apart from autoconf you will also need a number of other tools, which are desribed in the next paragraph. </para> </sect2> <sect2 id="tools-on-linux-obtaining"> <title>Obtaining the tools for Linux</title> <para> To simplify the installation process of the tools necessary to write PHP documentation, we have chosen to detail how to download and install the source RPMs from a sourceware mirror. You will need a working copy of <ulink url="&url.rpm;">RPM</ulink> installed. </para> <para> These tools are all separate packages and can be downloaded and installed directly from the author's websites if you want to. But be aware that we cannot provide information about compiling the original source codes. </para> <para> The RPMs with the necessary software can be downloaded from one of the following places: </para> <para> <itemizedlist> <listitem> <simpara> <ulink url="&url.docbookmirror1;">&url.docbookmirror1;</ulink> </simpara> </listitem> <listitem> <simpara> <ulink url="&url.docbookmirror2;">&url.docbookmirror2;</ulink> </simpara> </listitem> </itemizedlist> </para> <para> You will need to download the following files: <itemizedlist> <listitem><simpara>docbook-3.x-5.src.rpm</simpara></listitem> <listitem><simpara>jade-1.2.x-4.src.rpm</simpara></listitem> <listitem><simpara>jadetex-2.x-0.src.rpm</simpara></listitem> <listitem><simpara>psgml-1.2.x-1.src.rpm</simpara></listitem> <listitem><simpara>sgml-common-0.1-3.src.rpm</simpara></listitem> <listitem><simpara>stylesheets-0.10-2.src.rpm</simpara></listitem> </itemizedlist> </para> <para> These packages are updated from time to time. Please make sure you download the latest version available from the above sites (the actual file names may change, so if you find newer files than mentioned above, please <ulink url="mailto:pear-webmaster@php.net">report</ulink>, so we can update this list). </para> <note> <para> We currently use DocBook 3.1.7 (not the latest version) for writing peardoc files. We will probably update to Docbook 4 at a later point. </para> </note> </sect2> <sect2 id="tools-on-linux-installing"> <title>Installing the Tools</title> <para> If you downloaded all of the above files into a separate directory by themselves, simply issue the following command: </para> <para> <informalexample> <programlisting> $ rpm -Uvh *.rpm </programlisting> </informalexample> </para> <para> Or, you can issue them one by one in the following order: <informalexample> <programlisting> $ rpm -Uvh docbook-3.x-5.src.rpm $ rpm -Uvh jade-1.2.x-4.src.rpm $ rpm -Uvh jadetex-2.x-0.src.rpm $ rpm -Uvh psgml-1.2.x-1.src.rpm $ rpm -Uvh sgml-common-0.1-3.src.rpm $ rpm -Uvh stylesheets-0.10-2.src.rpm </programlisting> </informalexample> </para> <para> You should now have the necessary tools installed to edit and verify your PEAR documentation contributions. </para> </sect2> <sect2 id="tools-on-windows"> <title>Tools on Windows</title> <para> Although the peardoc environment is based on many Unix tools and techniques, there are ways to accomplish the same tasks on Windows. It is not too hard to set up a Windows working environment with CVS and the DocBook tools, but put away your mouse as you will need the keyboard for the majority of the tasks! :) </para> </sect2> <sect2 id="tools-on-windows-obtaining"> <title>Obtaining the tools for Windows</title> <para> You need the same tools as on Unix. </para> <para> To get it running on Windows, you'll need these tools: <itemizedlist> <listitem> <simpara> <ulink url="&url.win.cygwin;">Cygwin (bash for windows; it's huge...)</ulink> </simpara> </listitem> <listitem> <simpara> <ulink url="&url.jade;">Jade (the actual parser, take the windows binary dist)</ulink> </simpara> </listitem> <listitem> <simpara> <ulink url="&url.nwalsh;">Norman Walsh's modular DocBook stylesheets</ulink> </simpara> </listitem> <listitem> <simpara> <ulink url="&url.iso.entities;">Some ISO-entity declarations</ulink> </simpara> </listitem> </itemizedlist> </para> </sect2> <sect2 id="tools-on-windows-installing"> <title>Installing the Tools</title> <para> You need to download and install the Cygwin tools. Just select the "Install now!" link and run the supplied <filename>setup.exe</filename>. It will guide you through process of installation. These tools are port of standard Unix tools like sed, awk, autoconf, make, perl, ... for Windows. </para> <para> Run "Cygwin Bash Shell" command from the Programs menu (it will be added here by the previous step). Now you get a command line which behaves same as bash on Unix boxes. If you never worked with bash or Unix before, note that there are slashes (/) instead of backslashes (\) in paths. If you want to access the <literal>foo</literal> directory on drive <literal>c:</literal> write it as <literal>c:/foo</literal> instead of <literal>c:\foo.</literal> </para> <warning> <simpara> Do NOT use symlinks with Cygwin, it's buggy. (Jade doesn't like them, and the shell doesn't handle them very well either) </simpara> </warning> <para> Change to the dir where your peardoc snapshot is (or where you want to have it). Use, just like in Windows, the <literal>cd</literal> command. In Cygwin, the <literal>dir</literal> command is also supported. </para> <note> <simpara> If you decide to use another directory in one of the next steps, you'll probably need to modify <filename>peardoc/configure.in</filename> manually. We do not give any support if you are self-opinionated :) In this situation you can specify the DSSSL location manually by using the <literal>--with-dsssl=C:/path/to/dsssl</literal> option with configure. </simpara> </note> <para> Make sure that you are in the directory where the <literal>peardoc</literal> dir is located. (if you type <literal>ls</literal>, you should see <literal>peardoc</literal> listed). </para> <para> Type <literal>mkdir phpdoc-tools</literal>, and then unzip: <itemizedlist> <listitem><simpara>Jade to <literal>phpdoc-tools/jade</literal></simpara></listitem> <listitem><simpara>Norman Walsh's DSSSL files to <literal>phpdoc-tools/dsssl/docbook</literal></simpara></listitem> <listitem><simpara>the ISO-entities to <literal>phpdoc-tools/iso-entities</literal></simpara></listitem> </itemizedlist> XSL stylesheets are <emphasis>not necessary</emphasis> to generate the html versions of the manual, the DSSSL style sheets are used by default. If you think you would like to test XSL ones, than unzip Norman Walsh's XSL files to <literal>phpdoc-tools/xsl/docbook</literal>. See <ulink url="&url.nwalsh.xsl;">&url.nwalsh.xsl;</ulink> for more information and downloadable files. </para> <para> Now go to the <literal>peardoc</literal> directory, and execute: <informalexample> <programlisting> autoconf ./configure --with-lang=your_language_code </programlisting> </informalexample> Substitute <literal>your_language_code</literal> with a language code you checked out the files of, and would like to work on. The <literal>--with-lang</literal> parameter is optional. If you don't specify it, the default is <literal>en</literal> (English). </para> <para> If you didn't get any errors, you're ready to rock&roll. Otherwise, you could check out the <ulink url="&url.docbook.appa;">installation appendix</ulink> of "DocBook: The Definitive Guide". </para> </sect2> </sect1> </chapter> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->