adaptations for ps, pdf and html generation
Serge Steer [Wed, 16 May 2001 08:24:27 +0000 (08:24 +0000)]
scilab_doc/LaTex-doc/Change [new file with mode: 0755]
scilab_doc/LaTex-doc/Chapters.tex [new file with mode: 0755]
scilab_doc/LaTex-doc/Docu-html.tex
scilab_doc/LaTex-doc/Docu.tex
scilab_doc/LaTex-doc/Docu_pdf.tex [new file with mode: 0755]
scilab_doc/LaTex-doc/Makefile
scilab_doc/LaTex-doc/build-html [new file with mode: 0755]
scilab_doc/LaTex-doc/setref.emacs [new file with mode: 0755]
scilab_doc/LaTex-doc/tr2latex/troffman.sty

diff --git a/scilab_doc/LaTex-doc/Change b/scilab_doc/LaTex-doc/Change
new file mode 100755 (executable)
index 0000000..4459879
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh
+modify()
+{
+FILE=`basename $1`
+sed -e "s/Shead/subsubsection/g" \
+       -e "s/Seealso/subsubsection/g" \
+       -e "s/Sauthor/subsubsection/g" \
+       -e "s/.phead/%phead/g" \
+       -e "s/scitem/itemize/g" \
+       -e "s/\\\ind{/%ind{/g"  \
+       -e "s/\\\trait/%trait/g" \
+       -e "s/\\\bs[ .]/$\\backslash$ /g" \
+       -e "s/.begin{flush/%begin{flush/g" \
+       -e "s/.end{flush/%end{flush/g" \
+       -e "s/\\\label{.*}//g" \
+       $1 > manual/$FILE
+}
+
+for i in $*
+do
+   modify $i
+done 
diff --git a/scilab_doc/LaTex-doc/Chapters.tex b/scilab_doc/LaTex-doc/Chapters.tex
new file mode 100755 (executable)
index 0000000..0c75d38
--- /dev/null
@@ -0,0 +1,71 @@
+\chapter{Basic functions}
+\section{Programming}
+%\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap1} 
+\section{Graphic Library }
+%\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap2} 
+\section{Utilities and Elementary Functions}
+%\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap3} 
+\section{Input/Output functions}
+%\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap4} 
+\section{Handling of functions and libraries}
+%\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap5}
+\section{Strings manipulations}
+%\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap5-1}
+\section{Dialogs}
+%\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap5-2}
+\section{Utilities}
+%\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap5-3}
+\section{Time and date}
+%\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap5-4}
+\chapter{Specialized Toolboxes}
+%\chapter{General System and Control macros}
+\section{General System and Control macros}
+        \include{Chap6} 
+\section{Robust control toolbox}
+        \include{Chap7} 
+\section{Tools for dynamical systems}
+        \include{Chap13}
+\section{Examples}
+        \include{Chap14}
+\section{Non-linear tools (optimization and simulation) }
+%\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap8}
+\section{Signal Processing toolbox}
+%\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap9}
+\section{Polynomial calculations}
+%\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap10}
+\section{Linear Algebra}
+%\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap11}
+\section{Metanet}
+%\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap12}
+\section{Scicos} 
+        \include{Chap15}
+\section{Sound}
+ %\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap16}
+\section{Cumulative Distribution Functions, Inverses, Random
+        variables}
+%\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap17}
+\section{TCL/Tk interface}
+%\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap19}
+\section{Language and data translation tools}
+%\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap20}
+\section{Interprocess communication toolbox}
+%\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap21}
index b98247c..1815083 100755 (executable)
-\documentclass[11pt]{book}
-\usepackage{verbatim}
-\usepackage{makeidx}
-
-             \textheight=660pt 
-             \textwidth=15cm
-             \topmargin=-27pt 
-             \oddsidemargin=0.7cm
-             \evensidemargin=0.7cm
-             \marginparwidth=60pt
-\hbadness=10000                 % do not want underfull box messages--there are
-                                % usually lots in man pages
-\hfuzz=\maxdimen                % no overfull box messages either
+\documentstyle[verbatim,makeidx]{book}
 
+\def\Sdoc#1#2{\subsection{ #1: -----#2 \label{#1}}}
+\def\SSdoc#1#2{\subsubsection{ #1: -----#2 \label{#1}}}
 \newcommand{\bs}{$\backslash$}
 \def\under{\underline}
 \def\dotdot{\ddot}
 \def\nwl{\hfill\break}          % similar to LaTex's \newline but does not
-                                % complain if there is no line to break
-\def\ind#1{\par\everypar{\hangindent=#1\hangafter=0\hskip-\parindent}}
-\def\tmpind#1{\par\hskip#1}
-\newenvironment{SEPcntr}{\begin{center}}{\end{center}}
-\def\cntr#1{\begin{SEPcntr} #1 \end{SEPcntr}}
-% displayed text, indented, justification off
-\def\displaybegin{\par\begingroup\medskip\narrower\narrower\noindent
-                  \obeylines\obeyspaces}
-\def\displayend{\endgroup\smallskip\noindent}
 
-% try this TPlist environment
-\newcommand{\TPlistlabel}[1]{\mbox{#1}\hfil}
-\newenvironment{TPlist}[1]{
-\begin{list}{}
-    {
-      \let\makelabel\TPlistlabel
-      \settowidth{\labelwidth}{#1mm}
-      \setlength{\leftmargin}{\parmargin}       % all paragraphs have this much
-      \addtolength{\leftmargin}{\labelwidth}    % space for label
-    }
-  }{
-\end{list}}
-\def\trait{\begin{flushleft}\mbox{\hbox to \textwidth{\hrulefill}}
-       \end{flushleft}}
+\def\vector#1{\left( \begin{array}{c} #1  \end{array}\right)}
+\def\matrixq#1{\left( \begin{array}{cc} #1  \end{array}\right)}
+\def\sciverb#1{\mbox{\tt #1}} 
 
+\renewcommand{\cuttingunit}{subsection}. 
+\setcounter{cuttingdepth}{0}
+\makeindex 
+\includeonly{Chap1,Chap2,Chap3,Chap4,Chap5,Chap5-1,Chap5-2,Chap5-3,Chap5-4,Chap6,Chap7,Chap8,Chap9,Chap10,Chap11,Chap12,Chap13,Chap14,Chap15,Chap16,Chap17,Chap19,Chap20,Chap21}
+%\includeonly{Chap3}
 
-\def\phead#1#2#3#4#5{\section{#1}}
+\begin{document}
+\pagestyle{empty}
 
-\setcounter{secnumdepth}{3}
+\vspace{8.cm}
 
-\def\Sdoc#1#2{#1 - #2}
+{\Huge\bf SCILAB}
 
-\def\Shead#1{\subsection{#1}}
-\def\Seealso#1{\subsection{See Also}}
-\def\Sauthor#1{\subsection{Author}}
+\bigskip
 
-% For stuff to ignore 
-\def\ignore#1{}
+{\Huge\bf REFERENCE}
 
-%% Changing the default description Mode 
+\bigskip
 
-\def\scitemlabel#1{#1}
+{\Huge\bf MANUAL}
 
-\def\scitem{\list{}{\labelwidth\z@ \itemindent-\leftmargin 
-       \itemsep=-\parsep \let\makelabel\scitemlabel}}
+\vspace{3.cm}
 
-\let\endscitem\endlist
+{\Huge\bf Scilab Group}
 
-\let\undertext=\underline
+{\Large\bf
+INRIA Meta2 Project/ENPC Cergrene}
 
+\normalsize
 
+\vspace{12.cm}
 
+INRIA - Unit\'e de recherche de Rocquencourt - Projet Meta2
 
-\def\vector#1{\left( \begin{array}{c} #1  \end{array}\right)}
-\def\matrixq#1{\left( \begin{array}{cc} #1  \end{array}\right)}
-\def\sciverb#1{\mbox{\tt #1}}
-\makeindex 
-\includeonly{Chap1,Chap2,Chap3,Chap4,Chap5,Chap5-1,Chap5-2,Chap5-3,Chap6,Chap7,Chap8,Chap9,Chap10,Chap11,Chap12,Chap13,Chap14,Chap15,Chap16,Chap17,Chap19,Chap20,Chap21}
-\includeonly{Chap1}
+Domaine de Voluceau - Rocquencourt - BP 105 - 78153 Le Chesnay Cedex (France)
 
-\begin{document}
+{\bf Email: Scilab@inria.fr}
 
-\input{couvert.tex}
-
-\chapter{Programming}
-        \include{Chap1} 
-\chapter{Graphic Library }
-        \include{Chap2} 
-\chapter{Utilities and Elementary Functions}
-        \include{Chap3} 
-\chapter{Input/Output functions}
-        \include{Chap4} 
-\chapter{Handling of function and libraries}
-        \include{Chap5}
-\chapter{Strings manipulations}
-        \include{Chap5-1}
-\chapter{Dialogs}
-        \include{Chap5-2}
-\chapter{Utilities}
-        \include{Chap5-3}
-\chapter{General System and Control macros}
-        \include{Chap6} 
-\chapter{Robust control toolbox}
-        \include{Chap7} 
-\chapter{Non-linear tools (optimization and simulation) }
-        \include{Chap8}
-\chapter{Signal Processing toolbox}
-        \include{Chap9}
-        \include{Chap14}
-\chapter{Polynomial calculations}
-        \include{Chap10}
-\chapter{Linear Algebra}
-        \include{Chap11}
-\chapter{Metanet}
-        \include{Chap12}
-\chapter{Scicos} 
-        \include{Chap15}
-\chapter{Sound} 
-        \include{Chap16}
-\chapter{Cumulative Distribution Functions, Inverses, Random variables}
-        \include{Chap17}
-\chapter{Tools for dynamical systems}
-        \include{Chap13}
-\chapter{TCL/Tk interface}
-        \include{Chap19}
-\chapter{Language and data translation tools}
-        \include{Chap20}
-\chapter{Interprocess communication toolbox}
-        \include{Chap21}
+%\input{couvert.tex}
+\tableofcontents
+\input{Chapters}
 \printindex
 \end{document}
index 0df6653..57b42a4 100755 (executable)
@@ -7,59 +7,15 @@
              \marginparwidth=60pt
 \def\vector#1{\left( \begin{array}{c} #1  \end{array}\right)}
 \def\matrixq#1{\left( \begin{array}{cc} #1  \end{array}\right)}
-
+\def\sciverb#1{\mbox{\tt #1}}   
 \makeindex 
-\includeonly{Chap1,Chap2,Chap3,Chap4,Chap5,Chap5-1,Chap5-2,Chap5-3,Chap6,Chap7,Chap8,Chap9,Chap10,Chap11,Chap12,Chap13,Chap14,Chap15,Chap16,Chap17,Chap19,Chap20,Chap21}
-\includeonly{Chap3}
+\includeonly{Chap1,Chap2,Chap3,Chap4,Chap5,Chap5-1,Chap5-2,Chap5-3,Chap5-4,Chap6,Chap7,Chap8,Chap9,Chap10,Chap11,Chap12,Chap13,Chap14,Chap15,Chap16,Chap17,Chap19,Chap20,Chap21}
+%\includeonly{Chap3}
 
 \begin{document}
 
 \input{couvert.tex}
-
-\chapter{Programming}
-        \include{Chap1} 
-\chapter{Graphic Library }
-        \include{Chap2} 
-\chapter{Utilities and Elementary Functions}
-        \include{Chap3} 
-\chapter{Input/Output functions}
-        \include{Chap4} 
-\chapter{Handling of function and libraries}
-        \include{Chap5}
-\chapter{Strings manipulations}
-        \include{Chap5-1}
-\chapter{Dialogs}
-        \include{Chap5-2}
-\chapter{Utilities}
-        \include{Chap5-3}
-\chapter{General System and Control macros}
-        \include{Chap6} 
-\chapter{Robust control toolbox}
-        \include{Chap7} 
-\chapter{Non-linear tools (optimization and simulation) }
-        \include{Chap8}
-\chapter{Signal Processing toolbox}
-        \include{Chap9}
-        \include{Chap14}
-\chapter{Polynomial calculations}
-        \include{Chap10}
-\chapter{Linear Algebra}
-        \include{Chap11}
-\chapter{Metanet}
-        \include{Chap12}
-\chapter{Scicos} 
-        \include{Chap15}
-\chapter{Sound} 
-        \include{Chap16}
-\chapter{Cumulative Distribution Functions, Inverses, Random variables}
-        \include{Chap17}
-\chapter{Tools for dynamical systems}
-        \include{Chap13}
-\chapter{TCL/Tk interface}
-        \include{Chap19}
-\chapter{Language and data translation tools}
-        \include{Chap20}
-\chapter{Interprocess communication toolbox}
-        \include{Chap21}
+\tableofcontents
+\input{Chapters}
 \printindex
 \end{document}
diff --git a/scilab_doc/LaTex-doc/Docu_pdf.tex b/scilab_doc/LaTex-doc/Docu_pdf.tex
new file mode 100755 (executable)
index 0000000..e2fc7fe
--- /dev/null
@@ -0,0 +1,91 @@
+\documentstyle[verbatim,tr2latex/troffman,makeidx,hyperref,times]{book}
+             \textheight=660pt 
+             \textwidth=15cm
+             \topmargin=-27pt 
+             \oddsidemargin=0.7cm
+             \evensidemargin=0.7cm
+             \marginparwidth=60pt
+\def\vector#1{\left( \begin{array}{c} #1  \end{array}\right)}
+\def\matrixq#1{\left( \begin{array}{cc} #1  \end{array}\right)}
+\def\sciverb#1{\mbox{\tt #1}}   
+\makeindex 
+\includeonly{Chap1,Chap2,Chap3,Chap4,Chap5,Chap5-1,Chap5-2,Chap5-3,Chap5-4,Chap6,Chap7,Chap8,Chap9,Chap10,Chap11,Chap12,Chap13,Chap14,Chap15,Chap16,Chap17,Chap19,Chap20,Chap21}
+%\includeonly{Chap3}
+
+\begin{document}
+
+\input{couvert.tex}
+\tableofcontents
+\part{Basic functions}
+\chapter{Programming}
+\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap1} 
+\chapter{Graphic Library }
+\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap2} 
+\chapter{Utilities and Elementary Functions}
+\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap3} 
+\chapter{Input/Output functions}
+\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap4} 
+\chapter{Handling of functions and libraries}
+\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap5}
+\chapter{Strings manipulations}
+\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap5-1}
+\chapter{Dialogs}
+\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap5-2}
+\chapter{Utilities}
+\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap5-3}
+\chapter{Time and date}
+\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap5-4}
+\part{Specialized Toolboxes}
+\chapter{General System and Control macros}
+\section{Basic functions}
+        \include{Chap6} 
+\section{Robust control toolbox}
+        \include{Chap7} 
+\section{Tools for dynamical systems}
+        \include{Chap13}
+\section{Examples}
+        \include{Chap14}
+\chapter{Non-linear tools (optimization and simulation) }
+\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap8}
+\chapter{Signal Processing toolbox}
+\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap9}
+\chapter{Polynomial calculations}
+\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap10}
+\chapter{Linear Algebra}
+\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap11}
+\chapter{Metanet}
+\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap12}
+\chapter{Scicos} 
+        \include{Chap15}
+\chapter{Sound}
+ \setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap16}
+\chapter{Cumulative Distribution Functions, Inverses, Random
+        variables}
+\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap17}
+\chapter{TCL/Tk interface}
+\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap19}
+\chapter{Language and data translation tools}
+\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap20}
+\chapter{Interprocess communication toolbox}
+\setcounter{section}{1}\setcounter{subsection}{0}
+        \include{Chap21}
+\printindex
+\end{document}
index 108c117..039b57f 100755 (executable)
@@ -2,14 +2,14 @@ SHELL = /bin/sh
 
 include ../../Version.incl
 SCIDIR=../..
-SCIDOC=$(SCIDIR)/../$(SCIVERSION)/doc
+SCIDOC=$(SCIDIR)/doc
 include ../../Makefile.incl
 
 FILES = Chap1.tex Chap2.tex Chap3.tex Chap4.tex Chap5.tex \
        Chap6.tex Chap7.tex Chap8.tex Chap9.tex Chap10.tex \
        Chap11.tex Chap12.tex Chap13.tex Chap14.tex Chap15.tex \
        Chap16.tex Chap17.tex  Chap19.tex Chap20.tex \
-       Chap21.tex Chap5-1.tex Chap5-2.tex  Chap5-3.tex  
+       Chap21.tex Chap5-1.tex Chap5-2.tex  Chap5-3.tex  Chap5-4.tex  
 
 MAN = $(SCIDIR)/man/
 
@@ -41,7 +41,7 @@ $(SCIDOC)/Manual.ps: Tr2tex chapters couvert.tex couv2.ps
        $(LATEX) Docu.tex
        $(LATEX) Docu.tex
        $(LATEX) Docu.tex
-       makeindex -s Docu.isty Docu
+       makeindex -s Docu.isty Docu.idx
        $(LATEX) Docu.tex
        $(RM) $@
        dvips -o $@ Docu.dvi
@@ -53,11 +53,13 @@ pdf: Tr2tex chapters couvert.tex couv2.ps
        $(LATEX) Docu_pdf.tex
        $(LATEX) Docu_pdf.tex
        $(LATEX) Docu_pdf.tex
-       makeindex -s Docu.isty Docu_pdf
+       makeindex -s Docu.isty Docu_pdf.idx
        $(LATEX) Docu_pdf.tex
        dvips -z -o Manual_pdf.ps Docu_pdf.dvi
        ps2pdf Manual_pdf.ps
        mv  Manual_pdf.pdf ../Manual.pdf
+html: 
+       build-html
 
 couv2.ps: couv2.tex
        $(LATEX) couv2
@@ -108,6 +110,11 @@ Chap5-3.tex : $(TR2TEX) $(MAN)/utilities/?*.man
        @sed -e 's/\\documentstyle/%\\documentstyle/'                   -e 's/\\end{document}//' -e 's/\\begin{document}//' /tmp/Chap5-3.tex > Chap5-3.tex
        $(RM) /tmp/Chap5-3.tex
 
+Chap5-4.tex : $(TR2TEX) $(MAN)/time-date/?*.man
+       $(TR2TEX)  -m $(MAN)/time-date/?*.man > /tmp/Chap5-4.tex
+       @sed -e 's/\\documentstyle/%\\documentstyle/'                   -e 's/\\end{document}//' -e 's/\\begin{document}//' /tmp/Chap5-4.tex > Chap5-4.tex
+       $(RM) /tmp/Chap5-4.tex
+
 Chap6.tex : $(TR2TEX) $(MAN)/control/?*.man
        $(TR2TEX)  -m $(MAN)/control/?*.man > /tmp/Chap6.tex
        @sed -e 's/\\documentstyle/%\\documentstyle/'                   -e 's/\\end{document}//' -e 's/\\begin{document}//' /tmp/Chap6.tex > Chap6.tex
diff --git a/scilab_doc/LaTex-doc/build-html b/scilab_doc/LaTex-doc/build-html
new file mode 100755 (executable)
index 0000000..c96dbef
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+Change Chap*.tex
+cp Docu-html.tex manual/.
+cp Chapters.tex manual/.
+cd manual;
+  hevea Docu-html.tex;
+  sed -e "s/%/\\\%/g" Docu-html.haux>haux;
+  mv haux Docu-html.haux;hevea Docu-html.tex 
+  hacha Docu-html.html #execute setref.emacs to change the reference in Docu-html.html before
+cd ..
+tar czf ../manual-html.tar.gz manual/*.html manual/*.gif
diff --git a/scilab_doc/LaTex-doc/setref.emacs b/scilab_doc/LaTex-doc/setref.emacs
new file mode 100755 (executable)
index 0000000..da85672
--- /dev/null
@@ -0,0 +1,2 @@
+(fset 'setref
+   [?\C-s ?? ?? ?\C-  ?\C-r ?< ?c ?o ?d ?e ?> ?\C-  ?\C-s ?/ ?c ?o ?d ?e ?> (menu-bar) edit cut ?\C-s ?? ?? ?\C-  backspace backspace ?\C-y])
index 90a2c94..979342d 100755 (executable)
 % since we want to use #1 as an index entry we must 
 \def\Sdoc#1#2{
         \typeout{[#1]}% maybe temporary, but nice for progress report
-       %\smallskip\noindent\fbox{\hbox to \textwidth{#1 \hfill #2}}
-       %\subsection{{\tt #1} \hrulefill {\small\sl #2}}
        \subsection{{ #1} \hrulefill { #2}}
 }
+\def\SSdoc#1#2{
+        \typeout{[#1]}% maybe temporary, but nice for progress report
+       \subsubsection{{ #1} \hrulefill { #2}}
+}
 
 %  \def\index{\@bsphack\begingroup
 %             \def\protect####1{\string####1\space}\@sanitize
 \let\undertext=\underline
 
 \def\trait{\begin{flushleft}\mbox{\hbox to \textwidth{\hrulefill}}
-       \end{flushleft}}
\ No newline at end of file
+       \end{flushleft}}