howto/scilab documentation kit - Scilab Wiki

doc_kit, a toolkit for Scilab documentation writers

/!\ Many items on this page are deprecated.

Chapter 1. Introduction

This toolkit contains all the command-line tools needed to write some documentation for Scilab.

As of version 5, Scilab uses a strict subset of DocBook 5 for all its documentation. This toolkit also contains tools (manrev2sci and man2sci) which may be used to convert from Scilab's old formats (manrev.dtd and man.dtd) to the new one.

Chapter 2. Installation

This toolkit already includes all the needed software components :

Therefore you just need to install a JavaTM Development Kit (JDK) 1.5+ in order to be able to run the commandline tools.

Note that installing a Java runtime (JRE) is insufficient because some command-line tools expect to have the jar utility (part of the JDK, not part of the JRE) in the PATH.

All the command-line tools are found in the SCI/modules/helptools/bin subdirectory :

man2sci
sci2jh
sciviewhelp
sci2html
manrev2sci
scivalid
scivalid.bat
manrev2sci.bat
man2sci.bat
sci2html.bat
sciviewhelp.bat
sci2pdf.bat
sci2pdf
sci2jh.bat
sci2chm.bat

Chapter 3. The Scilab subset of DocBook 5

The documentation of Scilab must be written using the strict subset of DocBook 5 defined in SCI/modules/helptools/schema/scilab.rnc. DocBook 5 elements are fully documented in "DocBook 5.0 : The Definitive Guide", therefore there is not much to add here.

Important

The root element of a document which conforms to the Scilab DocBook 5 subset must have version attribute set to "5.0-subset Scilab".

Example:

   1 <xml version="1.0" encoding="UTF8" >
   2 <refentry version="5.0subset Scilab"
   3 xmlns="http//docbook.org/ns/docbook"
   4 ...

The subset comprises the following elements:

Chapter 4. The command-line tools

All command-line tools are self-documented. Simply execute the command without any argument to display a short help text.

Example:

C:\doc_kit\bin> sciviewhelp
Usage: sciviewhelp javahelp_jar_file ... javahelp_jar_file
Allows to browse the contents of one or more
JavaHelp[tm] .jar files created using sci2jh.
The name of a JavaHelp .jar file must end with '_help.jar'.

man2sci, man2sci.bat

Converts a document conforming to man.dtd to a document conforming to scilab.rnc. Usage: man2sci in_man_xml_file out_scilab_xml_file

manrev2sci, manrev2sci.bat

Converts a document conforming to manrev.dtd to a document conforming to scilab.rnc. Usage: manrev2sci in_manrev_xml_file out_scilab_xml_file

sci2html, sci2html.bat

Converts an XML document conforming to scilab.rnc to multi-page HTML. Usage: sci2html in_xml_file out_html_directory

sci2chm.bat

Converts an XML document conforming to scilab.rnc to a Windows HTML Help (".chm") file. Not available on platforms other than Windows. By default, this script assumes that hhc.exe is found in "C:\Program Files\HTML Help Workshop\hhc.exe". If this is not the case, please modify the "hhc" variable found at the beginning of the ".bat" file. Usage: sci2chm in_xml_file out_chm_file

sci2jh, sci2jh.bat

Converts an XML document conforming to scilab.rnc to a JavaHelp .jar file. out_javahelp_jar_file must end with "_help.jar". Usage: sci2jh in_xml_file out_javahelp_jar_file

sci2pdf, sci2pdf.bat

Converts an XML document conforming to scilab.rnc to PDF or to PostScript. A PostScript file is generated if out_pdf_or_ps_file ends with ".ps". Usage: sci2pdf in_xml_file out_pdf_or_ps_file

scivalid, scivalid.bat

Validates specified XML files against the scilab.rnc schema. Usage: scivalid xml_file ... xml_file

sciviewhelp, sciviewhelp.bat

Allows to browse the contents of one or more JavaHelp .jar files created using sci2jh. The name of a JavaHelp .jar file must end with "_help.jar". Usage: sciviewhelp javahelp_jar_file ... javahelp_jar_file

Chapter 5. Companion tools

Install scilab configuration add-on (XXE 4)

Chapter 6. XML examples

Image inclusion

   1   <refsection>
   2     <title>Example of image inclusion</title>
   3     <para>
   4       <inlinemediaobject>
   5         <imageobject>
   6           <imagedata fileref="../images/plot3d.png"/>
   7         </imageobject>
   8       </inlinemediaobject>
   9     </para>
  10   </refsection>

MathML inclusion : Separate file

   1   <refsection>
   2     <title>Exemple dinclusion de MathML</title>
   3     <para>
   4       <informalequation>
   5         <mediaobject>
   6           <imageobject>
   7             <imagedata align="center" fileref="../mml/quadratic.mml" />
   8           </imageobject>
   9         </mediaobject>
  10       </informalequation>
  11     </para>
  12   </refsection>

quadratic.mml

MathML inclusion : Inline

   1   <refsection>
   2     <title>Example of MathML inclusion  Inline</title>
   3     <para>
   4       <informalequation>
   5         <mediaobject>
   6           <imageobject>
   7             <imagedata>
   8               <mmlmath>
   9                 <mmlsemantics>
  10                   <mmlmrow>
  11                     <mmlmrow>
  12                       <mmlmfenced mmlclose="" mmlopen="">
  13                         <mmlmsub>
  14                           <mmlmrow>
  15                             <mmlmo mmlstretchy="false"></mmlmo>
  16 
  17                             <mmlmrow>
  18                               <mmlmi>z</mmlmi>
  19 
  20                               <mmlmrow>
  21                                 <mmlmrow>
  22                                   <mmlmo mmlstretchy="false"></mmlmo>
  23 
  24                                   <mmlmi>v</mmlmi>
  25 
  26                                   <mmlmo mmlstretchy="false"></mmlmo>
  27                                 </mmlmrow>
  28 
  29                                 <mmlmo mmlstretchy="false"></mmlmo>
  30 
  31                                 <mmlmi>z</mmlmi>
  32                               </mmlmrow>
  33 
  34                               <mmlmrow>
  35                                 <mmlmo mmlstretchy="false"></mmlmo>
  36 
  37                                 <mmlmi>u</mmlmi>
  38 
  39                                 <mmlmo mmlstretchy="false"></mmlmo>
  40                               </mmlmrow>
  41                             </mmlmrow>
  42 
  43                             <mmlmo mmlstretchy="false"></mmlmo>
  44                           </mmlmrow>
  45 
  46                           <mmlmrow>
  47                             <mmlmi mmlfontstyle="italic">ltol</mmlmi>
  48 
  49                             <mmlmrow>
  50                               <mmlmo mmlstretchy="false"></mmlmo>
  51 
  52                               <mmlmi>j</mmlmi>
  53 
  54                               <mmlmo mmlstretchy="false"></mmlmo>
  55                             </mmlmrow>
  56                           </mmlmrow>
  57                         </mmlmsub>
  58                       </mmlmfenced>
  59 
  60                       <mmlmo mmlstretchy="false"></mmlmo>
  61 
  62                       <mmlmi mmlfontstyle="italic">tol</mmlmi>
  63                     </mmlmrow>
  64 
  65                     <mmlmrow>
  66                       <mmlmrow>
  67                         <mmlmrow>
  68                           <mmlmo mmlstretchy="false"></mmlmo>
  69 
  70                           <mmlmi>j</mmlmi>
  71 
  72                           <mmlmo mmlstretchy="false"></mmlmo>
  73                         </mmlmrow>
  74 
  75                         <mmlmo mmlstretchy="false"></mmlmo>
  76 
  77                         <mmlmfenced mmlclose="" mmlopen="">
  78                           <mmlmsub>
  79                             <mmlmrow>
  80                               <mmlmo mmlstretchy="false"></mmlmo>
  81 
  82                               <mmlmrow>
  83                                 <mmlmi>z</mmlmi>
  84 
  85                                 <mmlmrow>
  86                                   <mmlmo mmlstretchy="false"></mmlmo>
  87 
  88                                   <mmlmi>u</mmlmi>
  89 
  90                                   <mmlmo mmlstretchy="false"></mmlmo>
  91                                 </mmlmrow>
  92                               </mmlmrow>
  93 
  94                               <mmlmo mmlstretchy="false"></mmlmo>
  95                             </mmlmrow>
  96 
  97                             <mmlmrow>
  98                               <mmlmi mmlfontstyle="italic">ltol</mmlmi>
  99 
 100                               <mmlmrow>
 101                                 <mmlmo mmlstretchy="false"></mmlmo>
 102 
 103                                 <mmlmi>j</mmlmi>
 104 
 105                                 <mmlmo mmlstretchy="false"></mmlmo>
 106                               </mmlmrow>
 107                             </mmlmrow>
 108                           </mmlmsub>
 109                         </mmlmfenced>
 110                       </mmlmrow>
 111 
 112                       <mmlmo mmlstretchy="false"></mmlmo>
 113 
 114                       <mmlmi mmlfontstyle="italic">tol</mmlmi>
 115                     </mmlmrow>
 116 
 117                     <mmlmrow>
 118                       <mmlmo mmlstretchy="false"></mmlmo>
 119 
 120                       <mmlmi>j</mmlmi>
 121 
 122                       <mmlmo mmlstretchy="false"></mmlmo>
 123                     </mmlmrow>
 124 
 125                     <mmlmi></mmlmi>
 126 
 127                     <mmlmi mmlfontstyle="normal">for</mmlmi>
 128 
 129                     <mmlmrow>
 130                       <mmlmi>j</mmlmi>
 131 
 132                       <mmlmo mmlstretchy="false">=</mmlmo>
 133 
 134                       <mmlmn>1</mmlmn>
 135                     </mmlmrow>
 136 
 137                     <mmlmi mmlfontstyle="normal"></mmlmi>
 138 
 139                     <mmlmi mmlfontstyle="normal">ntol</mmlmi>
 140                   </mmlmrow>
 141 
 142                   <mmlannotation
 143                   mmlencoding="StarMath 5.0">abszvzu_ltolj
 144                   lt= tolj cdot abszu_ltolj  tolj for
 145                   j=1ntol</mmlannotation>
 146                 </mmlsemantics>
 147               </mmlmath>
 148             </imagedata>
 149           </imageobject>
 150         </mediaobject>
 151       </informalequation>
 152     </para>
 153   </refsection>
 154 

howto/scilab documentation kit (last edited 2010-04-15 15:47:53 by Sylvestre Ledru)