Index: /trunk/gsdl-documentation/manuals/README.html
===================================================================
--- /trunk/gsdl-documentation/manuals/README.html	(revision 13862)
+++ /trunk/gsdl-documentation/manuals/README.html	(revision 13863)
@@ -1,5 +1,5 @@
 <html>
 <head>
-<title>Greenstone Manuals</title>
+<title>Greenstone Manuals README</title>
 </head>
 <body>
@@ -11,4 +11,5 @@
 <li><a href="#contents">Contents of this package</a></li>
 <li><a href="#file-structure">File structure</a></li>
+<li><a href="#include-gli-help">Including GLI Help in the User Guide</a></li>
 <li><a href="#generate-html">Generating HTML files</a></li>
 <li><a href="#pdf">Generataing PDF files</a></li>
@@ -31,20 +32,46 @@
 <dl>
 <dt>README.html</dt><dd>This file</dd>
-<dt>xml-source directory</dt><dd>Contains all the XML source files and images. Any changes to the Manuals should be made to the source files in this directory. The xml-source directory contains:
-<ul>
-<li>en, es, fr, ru subdirectories, which hold the source files for English, Spanish, French and Russian respectively. Each subdirectory contains 4 XML files and an images subdirectory. The 4 XML files correspond to the 4 Greenstone manuals: Develop's manual, Installer's manual, User's manual, and From Paper to Collection manual. The images directory contains all the images for every manual.</li>
-<p><b>Note:</b> The en folder for English is the primary one. Any changes should be made to this folder and let the translator take care of other languages.</p>
+<dt>xml-source directory</dt><dd>Contains all the XML source files and images. 
+Any changes to the Manuals should be made to the source files in this directory. 
+The xml-source directory contains:
+<ul>
+<li>en, es, fr, ru subdirectories, which hold the source files for English, 
+Spanish, French and Russian respectively. Each subdirectory contains 4 XML files 
+and an images subdirectory. The 4 XML files correspond to the 4 Greenstone 
+manuals: Develop's manual, Installer's manual, User's manual, and From Paper to 
+Collection manual. The images directory contains all the images for every 
+manual.</li>
+<p><b>Note:</b> The en folder for English is the primary one. Any changes should 
+be made to this folder and let the translator take care of other languages.</p>
 <li>manual.dtd: the DTD with the XML files</li>
 </ul>
 </dd>
-<dt>processing directory</dt><dd>Contains all the XSL files and CSS files for running XSL transform:
-<ul>
+<dt>processing directory</dt><dd>Contains all the XSL files and CSS files for 
+running XSL transform:
+<ul>
+<li><b>xml-to-top-index.xsl </b>XSL Transform file to generate a top index file 
+for all the manuals.</li>
+<li><b>xml-to-index.xsl</b> XSL Transform file to generate an index file for 
+individual chapters of one manual.</li>
+<li><b>xml-to-one-html.xsl</b> XSL transform file to generate a single HTML page 
+for each manual.</li>
+<li><b>xml-to-many-html.xsl</b> XSL transform file to generate individual HTML 
+files for each manual, every chapter is a HTML file.</li>
 <li><b>common.xsl</b> Common XSL templates for use with all transforms.</li>
-<li><b>xml-to-one-html.xsl</b> XSL transform file to generate a single HTML page for each manual.</li>
-<li><b>xml-to-many-html.xsl</b> XSL transform file to generate individual HTML files for each manual, every chapter is a HTML file.</li>
-<li><b>xml-to-index.xsl</b> XSL Transform file to generate an index file for individual chapters of one manual.</li>
-<li><b>xml-to-pdf.xsl</b> XSL Transform file to generate a PDF file for every manual.</li>
+<li><b>xml-to-pdf.xsl</b> XSL Transform file to generate a PDF file for every 
+manual.</li></a>
+
+<a name="contents"/>
 <li><b>fo-common.xsl</b> Common XSL templates for use with PDF transforms.</li>
-<li><b>crossref-inter.xsl, crossref.xsl, crossref-pdf.xsl</b> XSL files for getting the correct link address for links that refer to other chapters, sections, footnotes or other manuals. crossref-inter.xsl is used for generating multiple HTML files, crossref.xsl for generating a single HTML file, and crossref-pdf.xsl for generating PDF file.</li>
+<li><b>crossref-inter.xsl, crossref.xsl, crossref-pdf.xsl</b> XSL files for 
+getting the correct link address for links that refer to other chapters, 
+sections, footnotes or other manuals. crossref-inter.xsl is used for generating 
+multiple HTML files, crossref.xsl for generating a single HTML file, and 
+crossref-pdf.xsl for generating PDF file.</li></a>
+<li><b>manifest.xml </b>list of the manuals, used for generate the top index.</li>
+<li><b>pdf-fonts</b> directory holds all the font files for languages whose 
+fonts are not included in the base 14 fonts that FOP supports(see
+<a href="http://xmlgraphics.apache.org/fop/0.20.5/fonts.html">here</a> 
+for more).</li>
 </ul>
 </dd>
@@ -70,9 +97,27 @@
     --<i>language-code</i>
       --html
-        (all the generated html files)
+        (all the generated html files go here)
       --pdf
-        (all the generated pdf files)
+        (all the generated pdf files go here)
       --images
       style.css
+</pre>
+
+<a name="include-gli-help"/>
+<h2>Including the GLI Help in User Guide</h2>
+<p>The "Librarian Interface user guide" section in the User's Guide manual is generated from the GLI Help, so when GLI Help was updated, this section needs to be regenerated to an XML file under xml-source/language directory. To regenerate the XML file,</p>
+<ol>
+<li>Go to the Greenstone installation directory and run <code>source setup.bash</code></li>
+<li>Go to the <code>gsdl-documentation/shared</code> directory, run <br/>
+<code>java ApplyXSLT ../manuals/processing/gen-gli-help-to-manual-chapter.xsl $GSDLHOME/gli/help/{lang}/help.xml > ../manuals/xml-source/{lang}/help-{lang}.xml</code>
+<p>replace <code>{lang}</code> with a specific language code, for example:</p>
+<code>java ApplyXSLT ../manuals/processing/gen-gli-help-to-manual-chapter.xsl $GSDLHOME/gli/help/en/help.xml > ../manuals/xml-source/en/help-en.xml</code>
+</li>
+</ol>
+<p>In the XML source file of User's Guide, GLI Help is included by means of defining an ENTITY(chap_gli) in the DTD. For example:</p>
+<pre>
+&lt;!DOCTYPE Manual [
+ &lt;!ENTITY chap_gli SYSTEM "help-en.xml"&gt;
+]&gt;
 </pre>
 
@@ -95,5 +140,6 @@
 -->
 </ol>
-<p>The generate-html.sh scripts are shell scripts that carry out a lot of these commands for you.</p>
+<p>The generate-html.sh scripts are shell scripts that carry out a lot of these 
+commands for you, we recommend to use this script to generate the HTML pages.</p>
 
 <a name="pdf"/>
@@ -104,7 +150,8 @@
 <li>Generate the PDF file:<br/>
 <tt>export CLASSPATH=$CLASSPATH:../shared/fop/build/fop.jar:../shared/fop/lib</tt><br/>
-<tt>./../shared/fop/fop.sh -xsl processing/xml-to-pdf.xsl -xml xml-source/<i>language-code</i>/<i>manual-name</i>_<i>language-code</i>.xml -pdf build/<i>language-code</i>/pdf/<i>manual-name</i>_<i>language-code</i>.pdf</tt></li>
-</ol>
-<p>The generate-pdf.sh scripts are shell scripts that carry out a lot of these commands for you.</p>
+<tt>./../shared/fop/fop.sh -c ../shared/fop/conf/userconfig.xml -q -xsl processing/xml-to-pdf.xsl -xml xml-source/<i>language-code</i>/<i>manual-name</i>_<i>language-code</i>.xml -pdf build/<i>language-code</i>/pdf/<i>manual-name</i>_<i>language-code</i>.pdf</tt></li>
+</ol>
+<p>The generate-pdf.sh scripts are shell scripts that carry out a lot of these 
+commands for you, we recommend you to use </p>
 
 <a name="status"/>
@@ -128,12 +175,48 @@
 <p>To tranlate these manuals into other languages, use Greenstone Translator to do this, see <a href="http://wesson.cs.waikato.ac.nz:7070/wiki/index.php/GTI">here</a>.</p>
 <p>The "module-name" for the manuals are devmanual, installmanual, papermanual and usermanual.</p>
+<p>For languages whose fonts are not included in the base 14 fonts that FOP 
+supports, eg. Russian, new font may be required to install before generating PDF 
+files in these languages. Install a new language to FOP have 3 steps:</p>
+<ol>
+	<li>Find an appropriate font file (in .PFM or .TTF format) that contains the 
+	necessary fonts, and run to 
+	generate an XML file</li>
+	<li>Register to FOP by adding a new entry in the userconfig.xml file</li>
+	<li>In fo-common.xsl, add a new language-value pair for the <code>font</code><i>
+	</i>variable.</li>
+</ol>
+
+<p><b>[Example]</b></p>
+<p>For example, for the Russian language, the <code>L_10646.TTF</code>(under 
+Windows) TrueType Font file contains the required Cyrillic font, then run</p>
+<blockquote>
+	<p><code><font size="2">java -cp build\fop.jar;lib\avalon-framework.jar;lib\xml-apis.jar;lib\xercesImpl.jar;lib\xalan.jar 
+	org.apache.fop.fonts.apps.TTFReader [options] L_10646.TTF Cyrillic.xml</font></code></p>
+</blockquote>
+<p>to generate the font xml configure file <code>Cyrillic.xml</code>.</p>
+<p>Then go to the <code>conf</code> directory under fop installation directory, 
+open <code>userconfig.xml</code> file, in <code>&lt;fonts&gt;</code> element, add</p>
+<blockquote>
+	<p><code><font size="2">&lt;font metrics-file=&quot;//research/lh92/gsdl-documentation/shared/fop/conf/Cyrillic.xml&quot; 
+	kerning=&quot;yes&quot; embed-file=&quot;//research/lh92/gsdl-documentation/shared/fop/conf/L_10646.TTF&quot;&gt;<br>
+&nbsp; &lt;font-triplet name=&quot;Cyrillic&quot; style=&quot;normal&quot; weight=&quot;normal&quot;/&gt;<br>
+&nbsp; &lt;font-triplet name=&quot;Cyrillic&quot; style=&quot;normal&quot; weight=&quot;bold&quot;/&gt;<br>
+&nbsp; &lt;font-triplet name=&quot;Cyrillic&quot; style=&quot;italic&quot; weight=&quot;normal&quot;/&gt;<br>
+&nbsp; &lt;font-triplet name=&quot;Cyrillic&quot; style=&quot;italic&quot; weight=&quot;bold&quot;/&gt;<br>
+	&lt;/font&gt;</font></code></p>
+</blockquote>
+<p>Then run fop with <code>-c userconfig.xml</code> option to use the new 
+configuration.</p>
 
 <a name="todo"/>
-<h2>Known problems and TODO list</h2>
-<ol>
-<li>Automatic texts<dd>Texts like button names should be automatic generated, like in greenstone tutorials, but currently we didn't do this because the manuals are supposed to be rewritten soon, but this shall be done after the reversion.</dd></li>
-<li>PDF fonts<dd>The XML to PDF transform require for a correct font set for a specific language.</dd></li>
-<li>Images in PDF files<dd>Sometimes when images contain unusual fonts and characters, the conversion of the XML to PDF might broke down.</dd></li>
-<li>Navigation buttons<dd>Add navigation buttons in the html pages.</dd></li>
+<h2>ToDo list</h2>
+<ol>
+<li>Windows scripts<li>Automatic texts<p>Texts like button names should be automatic generated, like in greenstone tutorials, but currently we didn't do this because the manuals are supposed to be rewritten soon, but this shall be done after the reversion.</p></li>
+<li>PDF fonts (done, but for new languages still needs to find an appropriate 
+font set)<p>The XML to PDF transform require for a correct font set for a 
+specific language.</p></li>
+<li>Images in PDF files<p>Images should not be too long, otherwise cannot 
+generate the PDF file.</p></li>
+<li>Navigation buttons (done)<p>Add navigation buttons in the html pages.</p></li>
 </ol>
 </body>
