summaryrefslogtreecommitdiff
path: root/support/shlatex/en
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/shlatex/en
Initial commit
Diffstat (limited to 'support/shlatex/en')
-rw-r--r--support/shlatex/en/CHANGELOG.TXT51
-rw-r--r--support/shlatex/en/README.TXT38
-rw-r--r--support/shlatex/en/ShLaTeX1610
-rw-r--r--support/shlatex/en/install102
-rw-r--r--support/shlatex/en/man/cman21
-rw-r--r--support/shlatex/en/man/shlatex.1.bz2bin0 -> 3268 bytes
-rw-r--r--support/shlatex/en/man/shlatex.pdfbin0 -> 95707 bytes
-rw-r--r--support/shlatex/en/test/biblio.bib7
-rw-r--r--support/shlatex/en/test/externe.tex3
-rw-r--r--support/shlatex/en/test/test15
-rw-r--r--support/shlatex/en/test/test.tex68
-rw-r--r--support/shlatex/en/uninstall38
12 files changed, 1953 insertions, 0 deletions
diff --git a/support/shlatex/en/CHANGELOG.TXT b/support/shlatex/en/CHANGELOG.TXT
new file mode 100644
index 0000000000..4d94dc1808
--- /dev/null
+++ b/support/shlatex/en/CHANGELOG.TXT
@@ -0,0 +1,51 @@
+------ v1.2b ------
+
+o 21/08/2003 15:15
+ - Fixed a bug in tex8to7.
+ - CTRL^C are now supported.
+
+o 17/08/2003 00:36
+ - Fixed the following bug: concatenation in the dvipdf, dvips and ps2pdf log
+ files.
+
+o 06/08/2003 14:35
+ - New version of tex8to7 (v1.1c).
+
+o 05/08/2003 00:15
+ - Fixed the bug existing with bib file having a different name from the tex
+ file.
+ - Modification of the test in order to use such a bib file.
+
+
+------ v1.2a ------
+
+o 22/07/2003 13:47
+ - Fixed a bug with external files handling.
+
+o 21/07/2003 23:20
+ - A bug fixed in tex8to7 (problem with "\\{" and imbricated quotation
+ marks).
+ - The external files may now be stored in a directory different from the
+ directory of the main source file.
+
+o 17/07/2003 21:30
+ - The TODO.TXT files have merged into a single file having the same name and
+ being placed at the root of the project only in english language.
+
+o 09/07/2003 00:50
+ - The install and uninstall scripts have been changed in order to be more
+ flexible. They now check the presence of the files necessary to the
+ installation procedure.
+
+
+------ v1.2 ------
+
+o 03/07/2003 23:35
+ - Release of the first english version.
+
+
+------ v1.1b ------
+
+[...]
+
+(see the french version for older changelog)
diff --git a/support/shlatex/en/README.TXT b/support/shlatex/en/README.TXT
new file mode 100644
index 0000000000..b0144cd569
--- /dev/null
+++ b/support/shlatex/en/README.TXT
@@ -0,0 +1,38 @@
+ShLaTeX version 1.2b-en -- LaTeX compilation script for Linux.
+Copyright (C) 2003 Mael Hilléreau (mael.hillereau@free.fr)
+
+This program is under the terms of the GNU General Public Licence. The GNU GPL
+is supplied with this program (file "GPL.TXT").
+
+o Install :
+ open a root session and execute the "install" script.
+
+o Uninstall :
+ open a root session and execute the "uninstall" script.
+
+o Manual Installation :
+
+ If you don't have the root's rights, you may use ShLaTeX like this :
+
+ - Compile the "tex8to7" program :
+
+ cd ../src
+ gcc tex8to7.c -o tex8to7
+
+ the file "tex8to7" is now created.
+
+ - Copy the "ShLaTeX" script and the file "tex8to7" in an accessible directory
+ (i.e. which is in the PATH environment variable).
+
+ cp tex8to7 <dir>
+ cp ../en/ShLaTeX <dir>
+
+ where <dir> is the directory you'll have choosen.
+
+ - Change this files's rights in order to execute them :
+
+ cd <dir>
+ chmod 755 tex8to7 ShLaTeX
+
+ - You may now use the script...
+
diff --git a/support/shlatex/en/ShLaTeX b/support/shlatex/en/ShLaTeX
new file mode 100644
index 0000000000..f0ea2855d9
--- /dev/null
+++ b/support/shlatex/en/ShLaTeX
@@ -0,0 +1,1610 @@
+#!/bin/bash
+###############################################################################
+# #
+# ShLaTeX #
+# #
+###############################################################################
+# #
+# Author: Mael Hilléreau #
+# Mail: mael.hillereau@free.fr #
+# Web: http://mael.hillereau.free.fr #
+# Creation : 06/03/2003 #
+# Last modif.: 21/08/2003 #
+# Version: 1.2a-en #
+# Description: LaTeX compilation script for Linux #
+# #
+###############################################################################
+# #
+# ShLaTeX -- LaTeX compilation script for Linux. #
+# Copyright (C) 2003 Mael Hilléreau #
+# #
+# This program is free software; you can redistribute it and/or #
+# modify it under the terms of the GNU General Public License #
+# as published by the Free Software Foundation; either version 2 #
+# of the License, or (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program; if not, write to the Free Software #
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #
+# #
+###############################################################################
+
+nomshell=`expr match "$0" '.*/\([^-\]*\).*'`;
+version="1.2b-en";
+
+## envoi du code de retour approprié
+function fin() {
+ echo -ne "done.\n\n";
+ if [ $errindex -eq 1 ]
+ then
+ exit 3;
+ else
+ if [ $errbib -eq 1 ]
+ then
+ exit 2;
+ else
+ if [ $errcompil -eq 1 ]
+ then
+ exit 1;
+ else
+ exit 0;
+ fi
+ fi
+ fi
+}
+
+## suppression des temporaires
+function suppressionTemp() {
+ if [ $tmp -eq 0 ]
+ then
+ echo "deletion of latex temporary files...";
+ rm -fr ./"$f".ShLaTeX
+ fi
+}
+
+## fct de rappel pour CTRL^C
+function ctrlc() {
+ echo -ne "\n> Cancel!\n";
+ if [ ! "$f" == "-" ]
+ then
+ repCourant=`pwd`;
+ repCourant=`expr match "$repCourant" '.*/\(.*\)'`
+ if [ "$repCourant" == "$f".ShLaTeX ]
+ then
+ cd ..;
+ fi
+ suppressionTemp;
+ fi
+ fin;
+}
+
+## déclaration des variables globales
+
+# nom du fichier
+f="-";
+
+# codes d'erreur
+errindex=0;
+errcompil=0;
+errbib=0;
+
+# options préférencielles
+P_dvipdf=-1;
+P_pdflatex=-1;
+P_dvips=-1;
+P_pstopdf=-1;
+P_dvi=-1;
+P_idx=-1;
+P_no_idx=-1;
+P_idx_file="-";
+P_bib=-1;
+P_no_bib=-1;
+P_bib_file="-";
+P_toc=-1;
+P_no_toc=-1;
+P_tmp=-1;
+P_no_tmp=-1;
+P_z=-1;
+P_no_z=-1;
+P_un=-1;
+P_deux=-1;
+P_quatre=-1;
+P_sep=-1;
+P_no_sep=-1;
+P_m=-1;
+P_no_m=-1;
+P_view=-1;
+P_no_view=-1;
+P_sept=-1;
+P_huit=-1;
+P_v_ps="-";
+P_v_pdf="-";
+P_v_dvi="-";
+
+# options de la ligne de commande
+L_dvipdf=-1;
+L_pdflatex=-1;
+L_dvips=-1;
+L_pstopdf=-1;
+L_dvi=-1;
+L_idx=-1;
+L_no_idx=-1;
+L_idx_file="-";
+L_bib=-1;
+L_no_bib=-1;
+L_bib_file="-";
+L_toc=-1;
+L_no_toc=-1;
+L_tmp=-1;
+L_no_tmp=-1;
+L_z=-1;
+L_no_z=-1;
+L_un=-1;
+L_deux=-1;
+L_quatre=-1;
+L_sep=-1;
+L_no_sep=-1;
+L_m=-1;
+L_no_m=-1;
+L_view=-1;
+L_no_view=-1;
+L_sept=-1;
+L_huit=-1;
+L_v_ps="-";
+L_v_pdf="-";
+L_v_dvi="-";
+
+## options d'éxécution
+mode="dvi";
+idx=0;
+idx_file="-";
+bib=0;
+bib_file="-";
+toc=1;
+tmp=0;
+z=0;
+ppf=1;
+sep=0;
+m=0;
+view=1;
+ascii=7;
+v_ps="gv";
+v_pdf="gv";
+v_dvi="xdvi";
+
+## capture des CTRL^C
+trap "ctrlc" SIGINT
+
+## affiche une aide rapide
+function aideRapide() {
+ echo -ne "> Usage :\n";
+ echo -ne "\n";
+ echo -ne " $nomshell [options] <file.tex>\n";
+ echo -ne "\n";
+ echo -ne " hit \"man shlatex\" or \"$nomshell -?\" for more help.\n";
+ echo -ne "\n";
+}
+
+## affiche une aide complète
+function aideComplete() {
+echo ".TH \\fBShLaTeX\\fP 1 \"August 2003\" \"version 1.2b\" \"User Manual\"
+
+.SH NAME
+\\fBShLaTeX\\fP \\- Compilation script for documents written in LaTeX language.
+
+.SH SYNOPSIS
+\\fBShLaTeX\\fP [options] \\fIsourceFile.tex\\fP
+
+.SH DESCRIPTION
+.PP
+ This script allows to centralize the many program calls necessary to
+completely compile a LaTeX document. In particular, the multiple calls of the
+\\fBlatex\\fP command necessary in order to create a table of contents, a
+bibliography or an index are carried out automatically. Are also managed the
+call of the programs \\fBbibtex\\fP and \\fBmakeindex\\fP as well as the
+vizualisation of the resulting file (in DVI, PostScript or PDF format) by
+calling an external program.
+.PP
+ It is possible to compile documents wich use the \\fB\\input\\fP and
+\\fB\\include\\fP commands to make references to some external files and that in a
+transparent way by compiling only the main source file.
+.PP
+ Once compilation done, the temporary files are erased (option \\fB-no-tmp\\fP)
+or preserved (option \\fB-tmp\\fP). The DVI file generated by LaTeX can then
+directly be converted to the PostScript or PDF formats.
+.PP
+ This script also provides the stressing of the French characters by the
+intermediary of an external C program (named \\fBtex8to7\\fP) and provided with
+the script. It also manages the C cedilla as well as the replacement of the
+quotation marks by the \\fB\\\\og\\fP and \\fB\\\\fg\\fP commands (supposing that the
+quotation marks are coupled). The quotation marks may be imbricated by using
+accodances for distinguishing the different quotation mark couples. For example,
+the text :
+.PP
+ The quotation marks \"may be {\"imbricated\"} by using accodances\".
+.PP
+ is a correct example.
+.PP
+ The default options (preferences) are saved in the personal directory of the
+user, in the file \\fB~/.shlatex\\fP. See section FILES to know the synthax of
+this file.
+.SH OPTIONS
+.IP \"\\fB\\-dvipdf\\fP\"
+Select a PDF format instead of the DVI format for the resulting file. The
+program \\fBdvipdf\\fP is used for converting.
+.IP \"\\fB\\-pdflatex\\fP\"
+Select a PDF format instead of the DVI format for the resulting file. The
+program \\fBpdflatex\\fP is directly used to create the resulting file.
+.IP \"\\fB-dvips\\fP\"
+Select a PostScript format instead of the DVI format for the resulting file. The
+program \\fBdvips\\fP is used for converting.
+.IP \"\\fB-ps2pdf\\fP\"
+Select a PDF format instead of the PaostScript format for the resulting file.
+This option uses the \\fB-dvips\\fP option. The programs \\fBdvips\\fP and
+\\fBps2pdf\\fP are successively used for conversion and the PostScript file is
+keeped after conversion.
+.IP \"\\fB-dvi\\fP\"
+Select a DVI format for the resulting file.
+.IP \"\\fB-idx\\fP \\fI[style.ist]\\fP or \\fB--index\\fP \\fI[style.ist]\\fP\"
+Enable the creation of the index (using the \\fImakeidx\\fP latex module). The
+optionnal file \\fIstyle.ist\\fP is a style file for \\fBmakeindex\\fP.
+.IP \"\\fB-no-idx\\fP or \\fB--no-index\\fP\"
+Disable the creation of the index.
+.IP \"\\fB-bib\\fP \\fI[file.bib]\\fP or \\fB--bibliography\\fP \\fI[file.bib]\\fP\"
+Enable the creation of the bibliography with \\fBbibtex\\fP being based on
+\\fIfichier.bib\\fP. If no file is present, the file with the \".bib\" extension
+must have the same name as \\fIsourceFile\\fP.tex.
+.IP \"\\fB-no-bib\\fP or \\fB--no-bibliography\\fP\"
+Disable the creation of the bibliography.
+.IP \"\\fB-toc\\fP or \\fB--table-of-contents\\fP\"
+Enable the additional compilation for the construction of a table of contents, a
+table of figures, a list of figures and all LaTeX references
+(\\fB\\\\label{...}\\fP).
+.IP \"\\fB-no-toc\\fP or \\fB--no-table-of-contents\\fP\"
+Disnable the additional compilation for the construction of a table of contents,
+a table of figures, a list of figures and all LaTeX references
+(\\fB\\\\label{...}\\fP).
+.IP \"\\fB-tmp\\fP or \\fB--temporary\\fP\"
+Once compilation performed, keep the temporary files created by LaTeX.
+.IP \"\\fB-no-tmp\\fP or \\fB--no-temporary\\fP\"
+Once compilation performed, delete the temporary files created by LaTeX.
+.IP \"\\fB-z\\fP or \\fB--gzip\\fP\"
+Compress the PsotScript files with the program \\fBgzip\\fP. The files have then
+the extension \".ps.gz\".
+.IP \"\\fB-no-z\\fP or \\fB--no-gzip\\fP\"
+Disable compression of the PsotScript files with the program \\fBgzip\\fP.
+.IP \"\\fB-1\\fP or \\fB--1page\\fP\"
+Generate PostScript files having 1 page per a4 sheet.
+.IP \"\\fB-2\\fP or \\fB--2pages\\fP\"
+Generate PostScript files having 2 pages per a4 sheet.
+.IP \"\\fB-4\\fP or \\fB--4pages\\fP\"
+Generate PostScript files having 4 pages per a4 sheet.
+.IP \"\\fB-sep\\fP or \\fB--separator\\fP\"
+Use this option in conjunction with the options \\fB-2\\fP or \\fB-4\\fP. Draw a
+separating line between the different pages of a single sheet.
+.IP \"\\fB-no-sep\\fP or \\fB--no-separator\\fP\"
+Use this option in conjunction with the options \\fB-2\\fP or \\fB-4\\fP. Disable
+drawing a separating line between the different pages of a single sheet.
+.IP \"\\fB-m\\fP or \\fB--messages\\fP\"
+Always show the LaTeX messages in the terminal (see also the section COMPILATION
+ERRORS).
+.IP \"\\fB-no-m\\fP or \\fB--no-messages\\fP\"
+If this option is used, the LaTeX messages only appear if there is some errors
+(see also the section COMPILATION ERRORS).
+.IP \"\\fB-view\\fP or \\fB--viewer\\fP\"
+Enable the final vizualisation.
+.IP \"\\fB-no-view\\fP or \\fB--no-viewer\\fP\"
+Disable the final vizualisation.
+.IP \"\\fB-7\\fP or \\fB--7bits\\fP\"
+Disable the sressing of the LaTeX source file. The source file must then use 7
+bits ascii codes.
+.IP \"\\fB-8\\fP or \\fB--8bits\\fP\"
+Enable the sressing of the LaTeX source file. The source file may then use 8
+bits ascii codes.
+.IP \"\\fB-v-ps\\fP \\fIviewer\\fP or \\fB--view-ps-with\\fP \\fIviewer\\fP\"
+Use the program \\fIviewer\\fP for the final vizualisation of the PostScript
+files.
+.IP \"\\fB-v-pdf\\fP \\fIviewer\\fP or \\fB--view-pdf-with\\fP \\fIviewer\\fP\"
+Use the program \\fIviewer\\fP for the final vizualisation of the PDF files.
+.IP \"\\fB-v-dvi\\fP \\fIviewer\\fP or \\fB--view-dvi-with\\fP \\fIviewer\\fP\"
+Use the program \\fIviewer\\fP for the final vizualisation of the DVI files.
+.IP \"\\fB-v\\fP or \\fB--version\\fP\"
+Print version and exit.
+.IP \"\\fB-?\\fP, \\fB-h\\fP or \\fB--help\\fP\"
+Print some help.
+
+.IP \"\\fINote\\fP :\"
+When using the option \\fB\\-view\\fP, the resulting file format choosen (DVI,
+PostScript or PDF) must be compatible with the program \\fIviewer\\fP in order to
+make the vizualisation running correctly. By default, the programs used are
+\\fBxdvi\\fP for the DVI files and \\fBgv\\fP for the PostScript and PDF files.
+
+.SH \"COMPILATION ERRORS\"
+.PP
+ If option \\fB-no-m\\fP is used, if LaTeX compilation error occurs, the script
+seems to get stuck. One can stop it by typing command line options (\"x\" for
+ignore, \"q\" for quit, ...) without viewing the messages, or by typing \"Ctrl^C\".
+In the two cases, the error messages will be shown afterwards. This imperfection
+is due to the choice of not printing the \\fBlatex\\fP program messages by
+default. However, the problem exists only if the interaction mode allows LaTeX
+to stop on errors (wich is not the case, for instance if the \\fB\\\\nonstopmode\\fP
+command is used).
+.PP
+ Anyway, it is possible to force display of the \\fBlatex\\fP messages by using
+the option \\fB-m\\fP instead of the option \\fB-no-m\\fP.
+
+.SH \"FILES\"
+.PP
+ The file \\fB~/.shlatex\\fP contains the user's preferences. It can be modified
+in order to use custom default values for the script's options, but the synthax of
+the script must be respected :
+.PP
+ Each line of the file must hold a single option. All the options are allowed
+excepting \\fB-v\\fP and \\fB-?\\fP which wouldn't have any sence in this file. For
+the options which need a parameter, as in the shell, they will be placed after
+their respective option but the separator have to be a single space character
+('\\ '). The order of the options doesn't matter.
+.PP
+ If some inconstancies appear during execution of the script, some warnings
+will be displayed.
+.PP
+ If while running the script for the first time, the file \\fB~/.shlatex\\fP
+doesn't exist, it will be created automatically with the following content :
+.RS 5
+.IP \"-dvips\"
+.IP \"-view\"
+.IP \"-no-idx\"
+.IP \"-no-bib\"
+.IP \"-toc\"
+.IP \"-no-tmp\"
+.IP \"-no-z\"
+.IP \"-1\"
+.IP \"-no-sep\"
+.IP \"-no-m\"
+.IP \"-8\"
+.IP \"-v-ps gv\"
+.IP \"-v-pdf gv\"
+.IP \"-v-dvi xdvi\"
+
+.SH \"KNOWN PROBLEMS\"
+.SS \"BoundingBox\"
+.PP
+ While inserting an image with the command \\fB\\\\includegraphics\\fP, it is
+necessary to specify the \"boundingbox\" as argument of the command, unless
+compilation doesn't work. Here is an exemple :
+.PP
+ \\\\includegraphics[bb=0 0 100 200]{image.eps}
+.SS \"External files\"
+ If you want external file inclusion to work properly, you have to put the
+\\fB\\\\input\\fP and \\fB\\\\include\\fP commands on a single line in the file
+\\fIsourceFile.tex\\fP.
+
+.SH \"SEE ALSO\"
+.BR latex (1),
+.BR pdflatex (1),
+.BR dvips (1),
+.BR ps2pdf (1),
+.BR dvipdf (1),
+.BR xdvi (1),
+.BR gv (1),
+.BR gzip (1)
+
+.SH \"BUGS\"
+.PP
+Thanks for reporting bugs by sending an email to the AUTHOR section adress.
+
+.SH \"LICENCE\"
+.PP
+ This script and all its relative files (including this manual) are released
+under the terms of the GNU General Public Licence. The GNU GPL is provided with
+the script (file /usr/share/shlatex/GPL.TXT) and is also available at the adress
+http://www.gnu.org/licenses/gpl.html.
+
+.SH \"AUTHOR\"
+.PP
+Copyright (C) 2003 Mael Hilléreau
+.PP
+\\fIcontact\\fP : mael.hillereau@free.fr
+.PP
+\\fIweb\\fP : http://mael.hillereau.free.fr
+
+" > ~/ShLaTeX_"$version".tmp;
+man ~/ShLaTeX_"$version".tmp
+rm -f ~/ShLaTeX_"$version".tmp
+}
+
+## affiche un message d'erreur
+function erreur() {
+ echo -ne "\n";
+ echo -ne "> Error :\n";
+ echo -ne " $1\n";
+ echo -ne "\n";
+ if [ $# -eq 2 ]
+ then
+ if [ $2 == "-?" ]
+ then
+ aideRapide;
+ fi
+ fi
+}
+
+## affiche un message d'avertissement
+function avertissement() {
+ echo -ne "\n";
+ echo -ne "> Warning :\n";
+ echo -ne " $1\n";
+ echo -ne "\n";
+}
+
+## affiche la version et sort
+function version() {
+ echo -ne "$nomshell version $version - LaTeX compilation script for Linux.\nCopyright (C) 2003 Mael Hilléreau\n";
+ exit 0;
+}
+
+## recherche les fichiers externes (1 seul par ligne dans le source LaTeX !)
+function fichiersExternes() {
+ fExt="";
+ lignes=`grep -e "^[ |\t]*\input{" $1`;
+ lignes=`echo $lignes | grep -v -E "^[ |\t]*%.*"`
+ for l in $lignes
+ do
+ fExt="$fExt `expr match $l '.*\input{\(.*\)}'`";
+ done
+ lignes=`grep -e "^[ |\t]*\include{" $1`;
+ lignes=`echo $lignes | grep -v -E "^[ |\t]*%.*"`
+ for l in $lignes
+ do
+ fExt="$fExt `expr match $l '.*\include{\(.*\)}'`";
+ done
+ lignes=`grep -e "^[ |\t]*\in\(put\|clude\) " $1`;
+ lignes=`echo $lignes | grep -v -E "^[ |\t]*%.*"`
+ for l in $lignes
+ do
+ if [ ! $l == "\input" -a ! $l == "\include" ]
+ then
+ fExt="$fExt $l";
+ fi
+ done
+ fTemp="";
+ for l in $fExt
+ do
+ cTemp=`expr match $l '[ |\t]*\(.*\)\.tex'`;
+ if [[ $cTemp == "" ]]
+ then
+ fTemp="$fTemp $l";
+ else
+ fTemp="$fTemp $cTemp";
+ fi
+ done
+ fExt=$fTemp;
+}
+
+## remplace les fichiers externes nommés $1 par $2 dans le fichier $3
+function rplcExtFich() {
+ if [ -f $3 ]
+ then
+ lignes=`cat $3 | grep -n "\input $1" | tr " " "@"`;
+ lignes="`cat $3 | grep -n \input{$1}` $lignes";
+ for ligne in $lignes
+ do
+ ligne=`echo $ligne | tr "@" " "`;
+ nblignes=`wc -l $3 | tr -s " " ":" | cut -f 2 -d ":"`;
+ nligne=`echo $ligne | cut -f 1 -d ":"`;
+ nligne=`expr $nligne - 1`;
+ fin=`expr $nblignes - $nligne - 1`;
+ head -$nligne "$3" > "$3".tmp
+ echo "\input{$2}" >> "$3.tmp"
+ tail -n $fin "$3" >> "$3".tmp
+ mv -f "$3".tmp "$3"
+ done
+ lignes=`cat $3 | grep -n "\include $1" | tr " " "@"`;
+ lignes="`cat $3 | grep -n \include{$1}` $lignes";
+ for ligne in $lignes
+ do
+ ligne=`echo $ligne | tr "@" " "`;
+ nblignes=`wc -l $3 | tr -s " " ":" | cut -f 2 -d ":"`;
+ nligne=`echo $ligne | cut -f 1 -d ":"`;
+ nligne=`expr $nligne - 1`;
+ fin=`expr $nblignes - $nligne - 1`;
+ head -$nligne "$3" > "$3".tmp
+ echo "\include{$2}" >> "$3.tmp"
+ tail -n $fin "$3" >> "$3".tmp
+ mv -f "$3".tmp "$3"
+ done
+ fi
+}
+
+## vérifie que le fichier fourni est accessible et éxécutable
+function estExec() {
+ for rep in `echo $PATH | tr ":" " "`
+ do
+ if [ -x $rep/$1 ]
+ then
+ return 1;
+ fi
+ done
+ return 0;
+}
+
+## vérifie qu'au plus un seul des arguments entiers a été initialisé
+function verifInit() {
+ i=0;
+ for a
+ do
+ if [ $a -ne -1 ]
+ then
+ i=`expr $i + 1`;
+ fi
+ done
+ return $i;
+}
+
+## charge les préférences à partir du fichier ~/.shlatex (une option par ligne)
+function preferences() {
+ for ligne in `grep -e "^-.*" ~/.shlatex | tr " " "="`
+ do
+ opt=`expr match $ligne '[:space:]*\(-[-a-z0-9]*\)=*.*'`;
+ paramopt="";
+ paramopt=`expr match $ligne '[:space:]*-[-a-z0-9]*=\(.*\)'`;
+ case $opt in
+ "-dvipdf" )
+ P_dvipdf=1;;
+ "-pdflatex" )
+ P_pdflatex=1;;
+ "-ps2pdf" )
+ P_pstopdf=1;;
+ "-dvips" )
+ P_dvips=1;;
+ "-dvi" )
+ P_dvi=1;;
+ "-idx" | "--index" )
+ P_idx=1;
+ if [ ! $paramopt == "" ]
+ then
+ P_idx_file=$paramopt;
+ fi ;;
+ "-no-idx" | "--no-index" )
+ P_no_idx=1;
+ ;;
+ "-bib" | "--bibliography" )
+ P_bib=1;
+ if [ ! $paramopt == "" ]
+ then
+ P_bib_file=`expr match $paramopt '\(.*\)\.bib'`;
+ fi ;;
+ "-no-bib" | "--no-bibliography" )
+ P_no_bib=1;;
+ "-toc" | "--table-of-contents" )
+ P_toc=1;;
+ "-no-toc" | "--no-table-of-contents" )
+ P_no_toc=1;;
+ "-tmp" | "--temporary" )
+ P_tmp=1;;
+ "-no-tmp" | "--no-temporary" )
+ P_no_tmp=1;;
+ "-z" | "--gzip" )
+ P_z=1;;
+ "-no-z" | "--no-gzip" )
+ P_no_z=1;;
+ "-1" | "--1page" )
+ P_un=1;;
+ "-2" | "--2pages" )
+ P_deux=1;;
+ "-4" | "--4pages" )
+ P_quatre=1;;
+ "-sep" | "--separator" )
+ P_sep=1;;
+ "-no-sep" | "--no-separator" )
+ P_no_sep=1;;
+ "-m" | "--messages" )
+ P_m=1;;
+ "-no-m" | "--no-messages" )
+ P_no_m=1;;
+ "-view" | "--viewer" )
+ P_view=1;;
+ "-no-view" | "--no-viewer" )
+ P_no_view=1;;
+ "-7" )
+ P_sept=1;;
+ "-8" )
+ P_huit=1;;
+ "-v-ps" | "--view-ps-with" )
+ if [ ! $paramopt == "" ]
+ then
+ P_v_ps=$paramopt;
+ else
+ avertissement "file \"$HOME/.shalatex\" -- option \"$opt\" ignored, missing argument!";
+ fi ;;
+ "-v-pdf" | "--view-pdf-with" )
+ if [ ! $paramopt == "" ]
+ then
+ P_v_pdf=$paramopt;
+ else
+ avertissement "file \"$HOME/.shalatex\" -- option \"$opt\" ignored, missing argument!";
+ fi ;;
+ "-v-dvi" | "--view-dvi-with" )
+ if [ ! $paramopt == "" ]
+ then
+ P_v_dvi=$paramopt;
+ else
+ avertissement "file \"$HOME/.shalatex\" -- option \"$opt\" ignored, missing argument!";
+ fi ;;
+ * )
+ avertissement "file \"$HOME/.shlatex\" -- option \"$opt\" ignored ; this option doesn't exist or isn't supported in preferences file";;
+ esac
+ done
+ ## vérification des options des préférences
+ # mode
+ verifInit $P_pstopdf $P_dvips $P_dvipdf $P_pdflatex $P_dvi;
+ if [ $? -gt 1 ]
+ then
+ avertissement "file \"$HOME/.shlatex\" -- options -dvipdf, -dvips, -pdflatex, -ps2pdf and -dvi are mutually exclusive!";
+ fi
+ # index
+ verifInit $P_idx $P_no_idx;
+ if [ $? -gt 1 ]
+ then
+ avertissement "file \"$HOME/.shlatex\" -- options -idx and -no-idx are mutually exclusive!";
+ fi
+ # bibliography
+ verifInit $P_bib $P_no_bib;
+ if [ $? -gt 1 ]
+ then
+ avertissement "file \"$HOME/.shlatex\" -- options -bib and -no-bib are mutually exclusive!";
+ fi
+ # table of contents
+ verifInit $P_toc $P_no_toc;
+ if [ $? -gt 1 ]
+ then
+ avertissement "file \"$HOME/.shlatex\" -- options -toc and -no-toc are mutually exclusive!";
+ fi
+ # temporary
+ verifInit $P_tmp $P_no_tmp;
+ if [ $? -gt 1 ]
+ then
+ avertissement "file \"$HOME/.shlatex\" -- options -tmp and -no-tmp are mutually exclusive!";
+ fi
+ # gzip
+ verifInit $P_z $P_no_z;
+ if [ $? -gt 1 ]
+ then
+ avertissement "file \"$HOME/.shlatex\" -- options -z and -no-z are mutually exclusive!";
+ fi
+ # 1, 2, 4
+ verifInit $P_un $P_deux $P_quatre;
+ if [ $? -gt 1 ]
+ then
+ avertissement "file \"$HOME/.shlatex\" -- options -1, -2 and -4 are mutually exclusive!";
+ fi
+ # separator
+ verifInit $P_sep $P_no_sep;
+ if [ $? -gt 1 ]
+ then
+ avertissement "file \"$HOME/.shlatex\" -- options -sep and -no-sep are mutually exclusive!";
+ fi
+ # messages
+ verifInit $P_m $P_no_m;
+ if [ $? -gt 1 ]
+ then
+ avertissement "file \"$HOME/.shlatex\" -- options -m and -no-m are mutually exclusive!";
+ fi
+ # view
+ verifInit $P_view $P_no_view;
+ if [ $? -gt 1 ]
+ then
+ avertissement "file \"$HOME/.shlatex\" -- options -view and -no-view are mutually exclusive!";
+ fi
+ # 7, 8
+ verifInit $P_sept $P_huit;
+ if [ $? -gt 1 ]
+ then
+ avertissement "file \"$HOME/.shlatex\" -- options -7 and -8 are mutually exclusive!";
+ fi
+}
+
+## si il n'y a pas de fichier de préférences, on le crée avec des valeurs par défaut
+if [ ! -f ~/.shlatex ]
+then
+ echo -ne "-dvips\n-view\n-no-idx\n-no-bib\n-toc\n-no-tmp\n-no-z\n-1\n-no-sep\n-no-m\n-8\n-v-ps gv\n-v-pdf gv\n-v-dvi xdvi\n" > ~/.shlatex
+fi
+
+## chargement des préférences
+preferences;
+
+## vérification du nombre d'arguments et récupération des options
+if [ $# -lt 2 ]
+then
+ if [ $# -eq 1 ]
+ then
+ if [ $1 == "-?" -o $1 == "-h" -o $1 == "--help" ]
+ then
+ aideComplete;
+ exit 0;
+ elif [ $1 == "-v" -o $1 == "--version" ]
+ then
+ version
+ exit 0;
+ fi
+ else
+ erreur "bad number of arguments!" -?;
+ exit 1;
+ fi
+else
+ noshift=0;
+ while [ $# -gt 1 ]
+ do
+ case $1 in
+ "-dvipdf" )
+ L_dvipdf=1;;
+ "-pdflatex" )
+ L_pdflatex=1;;
+ "-ps2pdf" )
+ L_pstopdf=1;;
+ "-dvips" )
+ L_dvips=1;;
+ "-dvi" )
+ L_dvi=1;;
+ "-idx" | "--index" )
+ L_idx=1;
+ if [ $# -gt 2 ]
+ then
+ shift;
+ if [ ! ${1:0:1} == "-" ]
+ then
+ L_idx_file=$1;
+ else
+ noshift=1;
+ fi
+ fi ;;
+ "-no-idx" | "--no-index" )
+ L_no_idx=1;;
+ "-bib" | "--bibliography" )
+ L_bib=1;
+ if [ $# -gt 2 ]
+ then
+ shift;
+ if [ ! ${1:0:1} == "-" ]
+ then
+ if [ -f $1 ]
+ then
+ L_bib_file=`expr match "$1" '\(.*\)\.bib'`;
+ else
+ erreur "the bibliography file \"$1\" doesn't exists!" -?;
+ exit 1;
+ fi
+ else
+ noshift=1;
+ fi
+ fi ;;
+ "-no-bib" | "--no-bibliography" )
+ L_no_bib=1;;
+ "-toc" | "--table-of-contents" )
+ L_toc=1;;
+ "-no-toc" | "--no-table-of-contents" )
+ L_no_toc=1;;
+ "-tmp" | "--temporary" )
+ L_tmp=1;;
+ "-no-tmp" | "--no-temporary" )
+ L_no_tmp=1;;
+ "-z" | "--gzip" )
+ L_z=1;;
+ "-no-z" | "--no-gzip" )
+ L_no_z=1;;
+ "-1" | "--1page" )
+ L_un=1;;
+ "-2" | "--2pages" )
+ L_deux=1;;
+ "-4" | "--4pages" )
+ L_quatre=1;;
+ "-sep" | "--separator" )
+ L_sep=1;;
+ "-no-sep" | "--no-separator" )
+ L_no_sep=1;;
+ "-m" | "--messages" )
+ L_m=1;;
+ "-no-m" | "--no-messages" )
+ L_no_m=1;;
+ "-view" | "--viewer" )
+ L_view=1;;
+ "-no-view" | "--no-viewer" )
+ L_no_view=1;;
+ "-7" )
+ L_sept=1;;
+ "-8" )
+ L_huit=1;;
+ "-v-ps" | "--view-ps-with" )
+ if [ $# -gt 2 ]
+ then
+ shift;
+ if [ ! ${1:0:1} == "-" ]
+ then
+ estExec $1;
+ if [ $? -eq 1 ]
+ then
+ L_v_ps=$1;
+ else
+ erreur "the file \"$1\" isn't accessible or isn't runable on the command line!";
+ exit 1;
+ fi
+ else
+ noshift=1;
+ fi
+ else
+ erreur "the option $1 needs a parameter!" -?;
+ exit 1;
+ fi ;;
+ "-v-pdf" | "--view-pdf-with" )
+ if [ $# -gt 2 ]
+ then
+ shift;
+ if [ ! ${1:0:1} == "-" ]
+ then
+ estExec $1;
+ if [ $? -eq 1 ]
+ then
+ L_v_pdf=$1;
+ else
+ erreur "the file \"$1\" isn't accessible or isn't runable on the command line!";
+ exit 1;
+ fi
+ else
+ noshift=1;
+ fi
+ else
+ erreur "the option $1 needs a parameter!" -?;
+ exit 1;
+ fi ;;
+ "-v-dvi" | "--view-dvi-with" )
+ if [ $# -gt 2 ]
+ then
+ shift;
+ if [ ! ${1:0:1} == "-" ]
+ then
+ estExec $1;
+ if [ $? -eq 1 ]
+ then
+ L_v_dvi=$1;
+ else
+ erreur "the file \"$1\" isn't accessible or isn't runable on the command line!";
+ exit 1;
+ fi
+ else
+ noshift=1;
+ fi
+ else
+ erreur "the option $1 needs a parameter!" -?;
+ exit 1;
+ fi ;;
+ "-?" | "-h" | "--help" )
+ aideRapide;
+ exit 0;;
+ "-v" | "--version" )
+ version;;
+ * )
+ erreur "the option \"$1\" is incorrect!" -?;
+ exit 1;;
+ esac
+ if [ $noshift -eq 0 ]
+ then
+ shift;
+ else
+ noshift=0;
+ fi
+ done
+fi
+
+# vérification de l'existence d'un nom pour le fichier source LaTeX
+if [ $# -ne 1 ]
+then
+ erreur "LaTeX source file missing!" -?;
+ exit 1;
+fi
+
+# vérification de l'existence du fichier source LaTeX
+if [ ! -f $1 ]
+then
+ erreur "unable to find the file \"$1\"!" -?;
+ exit 1;
+fi
+
+# nom du fichier source
+fich=$1;
+
+# nom du fichier source sans son extension ".tex"
+f=`expr match "$fich" '\(.*\)\.[a-zA-Z]*'`;
+
+## vérification des options de la ligne de commande
+# mode
+verifInit $L_pstopdf $L_dvips $L_dvipdf $L_pdflatex $L_dvi;
+iopt=$?;
+if [ $iopt -gt 1 ]
+then
+ erreur "options -dvipdf, -dvips, -pdflatex, -ps2pdf and -dvi are mutually exclusive!";
+ exit 1;
+elif [ $iopt -eq 1 ]
+then
+ # ligne de commande
+ if [ $L_dvipdf -eq 1 ]
+ then
+ mode="dvipdf";
+ elif [ $L_dvips -eq 1 ]
+ then
+ mode="dvips";
+ elif [ $L_pdflatex -eq 1 ]
+ then
+ mode="pdflatex";
+ elif [ $L_pstopdf -eq 1 ]
+ then
+ mode="ps2pdf";
+ elif [ $L_dvi -eq 1 ]
+ then
+ mode="dvi";
+ fi
+else
+ # préférences
+ if [ $P_dvipdf -eq 1 ]
+ then
+ mode="dvipdf";
+ elif [ $P_dvips -eq 1 ]
+ then
+ mode="dvips";
+ elif [ $P_pdflatex -eq 1 ]
+ then
+ mode="pdflatex";
+ elif [ $P_pstopdf -eq 1 ]
+ then
+ mode="ps2pdf";
+ elif [ $P_dvi -eq 1 ]
+ then
+ mode="dvi";
+ fi
+fi
+# index
+verifInit $L_idx $L_no_idx;
+iopt=$?;
+if [ $iopt -gt 1 ]
+then
+ erreur "options -idx and -no-idx are mutually exclusive!";
+ exit 1;
+elif [ $iopt -eq 1 ]
+then
+ # ligne de commande
+ if [ $L_idx -eq 1 ]
+ then
+ idx=1;
+ else
+ idx=0;
+ fi
+else
+ # préférences
+ if [ $P_idx -eq 1 ]
+ then
+ idx=1;
+ else
+ idx=0;
+ fi
+fi
+if [ ! $L_idx_file == "-" ]
+then
+ idx_file=$L_idx_file;
+elif [ ! $P_idx_file == "-" ]
+then
+ idx_file=$P_idx_file;
+fi
+# bibliography
+verifInit $L_bib $L_no_bib;
+iopt=$?;
+if [ $iopt -gt 1 ]
+then
+ erreur "options -bib and -no-bib are mutually exclusive!";
+ exit 1;
+elif [ $iopt -eq 1 ]
+then
+ # ligne de commande
+ if [ $L_bib -eq 1 ]
+ then
+ bib=1;
+ else
+ bib=0;
+ fi
+else
+ # préférences
+ if [ $P_bib -eq 1 ]
+ then
+ bib=1;
+ else
+ bib=0;
+ fi
+fi
+if [ ! $L_bib_file == "-" ]
+then
+ bib_file=$L_bib_file;
+elif [ ! $P_bib_file == "-" ]
+then
+ bib_file=$P_bib_file;
+fi
+# table of contents
+verifInit $L_toc $L_no_toc;
+iopt=$?;
+if [ $iopt -gt 1 ]
+then
+ erreur "options -toc and -no-toc are mutually exclusive!";
+ exit 1;
+elif [ $iopt -eq 1 ]
+then
+ # ligne de commande
+ if [ $L_toc -eq 1 ]
+ then
+ toc=1;
+ else
+ toc=0;
+ fi
+else
+ # préférences
+ if [ $P_toc -eq 1 ]
+ then
+ toc=1;
+ else
+ toc=0;
+ fi
+fi
+# temporary
+verifInit $L_tmp $L_no_tmp;
+iopt=$?;
+if [ $iopt -gt 1 ]
+then
+ erreur "options -tmp and -no-tmp are mutually exclusive!";
+ exit 1;
+elif [ $iopt -eq 1 ]
+then
+ # ligne de commande
+ if [ $L_tmp -eq 1 ]
+ then
+ tmp=1;
+ else
+ tmp=0;
+ fi
+else
+ # préférences
+ if [ $P_tmp -eq 1 ]
+ then
+ tmp=1;
+ else
+ tmp=0;
+ fi
+fi
+# gzip
+verifInit $L_z $L_no_z;
+iopt=$?;
+if [ $iopt -gt 1 ]
+then
+ erreur "options -z and -no-z are mutually exclusive!";
+ exit 1;
+elif [ $mode == "dvips" -o $mode == "ps2pdf" ]
+then
+ if [ $iopt -eq 1 ]
+ then
+ # ligne de commande
+ if [ $L_z -eq 1 ]
+ then
+ z=1;
+ else
+ z=0;
+ fi
+ else
+ # préférences
+ if [ $P_z -eq 1 ]
+ then
+ z=1;
+ else
+ z=0;
+ fi
+ fi
+elif [ $iopt -eq 1 ]
+then
+ avertissement "option -z ignored -- option -z doesn't concern PostScript files!";
+fi
+# 1, 2, 4
+verifInit $L_un $L_deux $L_quatre;
+iopt=$?;
+if [ $iopt -gt 1 ]
+then
+ erreur "options -1, -2 and -4 are mutually exclusive!";
+ exit 1;
+elif [ $mode == "dvips" -o $mode == "ps2pdf" ]
+then
+ if [ $iopt -eq 1 ]
+ then
+ # ligne de commande
+ if [ $L_un -eq 1 ]
+ then
+ ppf=1;
+ elif [ $L_deux -eq 1 ]
+ then
+ ppf=2;
+ else
+ ppf=4;
+ fi
+ else
+ # préférences
+ if [ $P_un -eq 1 ]
+ then
+ ppf=1;
+ elif [ $P_deux -eq 1 ]
+ then
+ ppf=2;
+ else
+ ppf=4;
+ fi
+ fi
+elif [ $iopt -eq 1 ]
+then
+ if [ $L_un -eq 1 ]
+ then
+ avertissement "option -1 ignored -- options -1, -2 and -4 only concern PostScript files!";
+ elif [ $L_deux -eq 1 ]
+ then
+ avertissement "option -2 ignored -- options -1, -2 and -4 only concern PostScript files!";
+ else
+ avertissement "option -4 ignored -- options -1, -2 and -4 only concern PostScript files!";
+ fi
+fi
+# separator
+verifInit $L_sep $L_no_sep;
+iopt=$?;
+if [ $iopt -gt 1 ]
+then
+ erreur "options -sep and -no-sep are mutually exclusive!";
+ exit 1;
+elif [ $ppf -gt 1 ]
+then
+ if [ $iopt -eq 1 ]
+ then
+ # ligne de commande
+ if [ $L_sep -eq 1 ]
+ then
+ sep=1;
+ else
+ sep=0;
+ fi
+ else
+ # préférences
+ if [ $P_sep -eq 1 ]
+ then
+ sep=1;
+ else
+ sep=0;
+ fi
+ fi
+elif [ $iopt -eq 1 ]
+then
+ avertissement "option -sep ignored -- option -sep must be used with options -2 and -4!";
+fi
+# messages
+verifInit $L_m $L_no_m;
+iopt=$?;
+if [ $iopt -gt 1 ]
+then
+ erreur "options -m and -no-m are mutually exclusive!";
+ exit 1;
+elif [ $iopt -eq 1 ]
+then
+ # ligne de commande
+ if [ $L_m -eq 1 ]
+ then
+ m=1;
+ else
+ m=0;
+ fi
+else
+ # préférences
+ if [ $P_m -eq 1 ]
+ then
+ m=1;
+ else
+ m=0;
+ fi
+fi
+# view
+verifInit $L_view $L_no_view;
+iopt=$?;
+if [ $iopt -gt 1 ]
+then
+ erreur "options -view and -no-view are mutually exclusive!";
+ exit 1;
+elif [ $iopt -eq 1 ]
+then
+ # ligne de commande
+ if [ $L_view -eq 1 ]
+ then
+ view=1;
+ else
+ view=0;
+ fi
+else
+ # préférences
+ if [ $P_view -eq 1 ]
+ then
+ view=1;
+ else
+ view=0;
+ fi
+fi
+# 7, 8
+verifInit $L_sept $L_huit;
+iopt=$?;
+if [ $iopt -gt 1 ]
+then
+ erreur "options -7 and -8 are mutually exclusive!";
+ exit 1;
+elif [ $iopt -eq 1 ]
+then
+ # ligne de commande
+ if [ $L_sept -eq 1 ]
+ then
+ ascii=7;
+ else
+ ascii=8;
+ fi
+else
+ # préférences
+ if [ $P_sept -eq 1 ]
+ then
+ ascii=7;
+ else
+ ascii=8;
+ fi
+fi
+# v_dvi
+if [ ! $L_v_dvi == "-" ]
+then
+ # lige de commande
+ v_dvi=$L_v_dvi;
+elif [ ! $P_v_dvi == "-" ]
+then
+ # préférences
+ v_dvi=$P_v_dvi;
+fi
+# v_ps
+if [ ! $L_v_ps == "-" ]
+then
+ # lige de commande
+ v_ps=$L_v_ps;
+elif [ ! $P_v_ps == "-" ]
+then
+ # préférences
+ v_ps=$P_v_ps;
+fi
+# v_pdf
+if [ ! $L_v_pdf == "-" ]
+then
+ # lige de commande
+ v_pdf=$L_v_pdf;
+elif [ ! $P_v_pdf == "-" ]
+then
+ # préférences
+ v_pdf=$P_v_pdf;
+fi
+
+
+## test de l'existance du fichier de bibliographie
+if [ $bib -eq 1 -a $bib_file == "-" ]
+then
+ if [ ! -f "$f".bib ]
+ then
+ erreur "you have used option -bib and the file \"$f.bib\" doesn't exists!" -?;
+ exit 1;
+ fi
+fi
+
+
+## affichage d'un petit message de version
+echo -ne "\n$nomshell version $version - LaTeX compilation script for Linux.\nCopyright (C) 2003 Mael Hilléreau\n\n";
+
+
+## création d'un répertoire de travail
+if [ ! -d "$f".ShLaTeX ]
+then
+ mkdir "$f".ShLaTeX
+fi
+
+
+## recherche (non récursive) des fichiers externes
+fichiersExternes $fich
+
+
+## copie du fichier latex source principal
+cp "$f".tex "$f".ShLaTeX
+
+## copie des fichiers latex source externes
+fExtTmp="";
+for fe in $fExt
+do
+ if [ -f "$fe".tex ]
+ then
+ cp "$fe".tex "$f".ShLaTeX
+ # élimination du chemin relatif dans le fichier source
+ sansChemin=`expr match "/$fe" '.*/\(.*\)'`;
+ rplcExtFich "$fe.tex" "$sansChemin.tex" "$f".ShLaTeX/"$f".tex
+ fExtTmp="$sansChemin $fExtTmp";
+ else
+ avertissement "the external file \"$fe.tex\" referenced in \"$fich\" is unavailable!";
+ fi
+done
+fExt=$fExtTmp;
+
+## copie du fichier de bibliographie
+if [ $bib -eq 1 ]
+then
+ if [ $bib_file == "-" ]
+ then
+ bib_file=$f;
+ fi
+ cp "$bib_file".bib "$f".ShLaTeX
+fi
+
+## copie du fichier de style d'index
+if [ ! $idx_file == "-" ]
+then
+ if [ -f $idx_file ]
+ then
+ cp $idx_file "$f".ShLaTeX
+ fi
+fi
+
+## on passe dans le répertoire de travail
+cd "$f".ShLaTeX
+
+## accentuation
+if [ $ascii -eq 8 ]
+then
+ ## accentuation du fichier latex source
+ echo "> Stressing in progress...";
+ echo -ne "<$fich>"
+ tex8to7 $fich > /dev/null 2>&1
+
+ ## écrasement du fichier latex source
+ mv -f "$fich"7 $fich
+
+ ## accentuation et écrasement des fichier latex source externes
+ for fe in $fExt
+ do
+ if [ -f "$fe".tex ]
+ then
+ echo -ne "<$fe.tex>"
+ tex8to7 "$fe".tex > /dev/null 2>&1
+ mv -f "$fe".tex7 "$fe".tex
+ fi
+ done
+ echo ""
+fi
+
+## compilation du fichier latex source accuentué
+echo "> Begining latex compilation...";
+reslatex=0;
+echo "> Compilation (ShLaTeX)" >latex.log
+if [ ! $mode == "pdflatex" ]
+then
+ if [ $m -eq 1 ]
+ then
+ latex $fich
+ else
+ latex $fich >>latex.log 2>&1
+ fi
+ reslatex=$?;
+else
+ if [ $m -eq 1 ]
+ then
+ pdflatex $fich
+ else
+ pdflatex $fich >>latex.log 2>&1
+ fi
+ reslatex=$?;
+fi
+if [ $reslatex -ne 0 ]
+then
+ errcompil=1;
+else
+ echo "first compilation successfull.";
+fi
+
+## création de la biliographie et deuxième compilation
+if [ $bib -eq 1 -a $errcompil -ne 1 ]
+then
+ echo "> Creation of the bibliography...";
+ bib_file=`expr match "/$bib_file" '.*/\(.*\)'`;
+ if [ $ascii -eq 8 ]
+ then
+ echo "> Stressing the file \""$bib_file".bib\"...";
+ tex8to7 "$bib_file".bib > /dev/null 2>&1
+ echo "<$bib_file.bib>"
+ mv -f "$bib_file".bib7 "$bib_file".bib
+ fi
+ bibtex "$f" > bibtex.log 2>&1
+ if [ $? -eq 0 ]
+ then
+ if [ ! $mode == "pdflatex" ]
+ then
+ echo "> Compilation (ShLaTeX)" >>latex.log
+ latex $fich >>latex.log 2>&1
+ reslatex=$?;
+ else
+ echo "> Compilation (ShLaTeX)" >>latex.log
+ pdflatex $fich >>latex.log 2>&1
+ reslatex=$?;
+ fi
+ if [ $reslatex -ne 0 ]
+ then
+ errcompil=1;
+ else
+ echo "second compilation successfull.";
+ fi
+ else
+ echo -ne "\n";
+ cat bibtex.log
+ erreur "problem while creating the bibliography!";
+ errbib=1;
+ fi
+fi
+
+## création d'un index
+if [ $idx -eq 1 -a $errcompil -ne 1 -a $errbib -ne 1 ]
+then
+ echo "> Creation of the index...";
+ if [ $idx_file == "-" ]
+ then
+ makeindex "$f".idx > makeindex.log 2>&1
+ else
+ makeindex -s $idx_file "$f".idx > makeindex.log 2>&1
+ fi
+ if [ $? -ne 0 ]
+ then
+ echo -ne "\n";
+ cat makeindex.log
+ cat "$f".ilg 2>/dev/null
+ erreur "problem while creating the index!";
+ errindex=1;
+ else
+ errindex=0;
+ echo "index successfully created.";
+ fi
+fi
+
+## deuxième ou troisième compilation pour l'index et la table des matières
+if [ $toc -eq 1 -a $errbib -ne 1 -a $errindex -ne 1 -a $errcompil -ne 1 ]
+then
+ if [ ! $mode == "pdflatex" ]
+ then
+ echo "> Compilation (ShLaTeX)" >>latex.log
+ latex $fich >>latex.log 2>&1
+ reslatex=$?;
+ else
+ echo "> Compilation (ShLaTeX)" >>latex.log
+ pdflatex $fich >>latex.log 2>&1
+ reslatex=$?;
+ fi
+ if [ $reslatex -ne 0 ]
+ then
+ errcompil=1;
+ else
+ if [ $bib -eq 1 ]
+ then
+ echo "third compilation successfull.";
+ else
+ echo "second compilation successfull.";
+ fi
+ fi
+fi
+
+## déplacement du fichier dvi ou pdf
+if [ $mode == "pdflatex" ]
+then
+ mv "$f".pdf ..
+else
+ mv "$f".dvi ..
+fi
+
+## on sort du répertoire de travail
+cd ..
+
+## conversion du fichier dvi
+errconvert=0;
+if [ $errbib -ne 1 -a $errindex -ne 1 -a $errcompil -ne 1 -a ! $mode == "pdflatex" -a ! $mode == "dvi" ]
+then
+ echo "> Conversion in progress...";
+ if [ $mode == "dvipdf" ]
+ then
+ dvipdf "$f".dvi "$f".pdf >> ./"$f".ShLaTeX/dvipdf.log 2>&1
+ if [ $? -ne 0 ]
+ then
+ echo -ne "\n";
+ cat ./"$f".ShLaTeX/dvipdf.log
+ erreur "problem while converting in PDF!";
+ errconvert=1;
+ fi
+ elif [ $mode == "dvips" -o $mode == "ps2pdf" ]
+ then
+ dvips -Ppdf "$f".dvi -o "$f".ps >> ./"$f".ShLaTeX/dvips.log 2>&1
+ if [ $? -ne 0 ]
+ then
+ echo -ne "\n";
+ cat ./"$f".ShLaTeX/dvips.log
+ erreur "problem while converting in PostScript!";
+ errconvert=1;
+ fi
+ if [ $errconvert -ne 1 ]
+ then
+ optpstops="";
+ if [ $sep -eq 1 ]
+ then
+ optpstops="-d";
+ fi
+ if [ $ppf -eq 2 ]
+ then
+ pstops $optpstops "2:0L@.7(21cm,0cm)+1L@.7(21cm,14.85cm)" "$f".ps "$f".2ppf.ps >/dev/null 2>&1
+ mv "$f".2ppf.ps "$f".ps
+ elif [ $ppf -eq 4 ]
+ then
+ pstops $optpstops "4:0@.5(0cm,14.85cm)+1@.5(10.5cm,14.85cm)+2@.5(0cm,0cm)+3@.5(10.5cm,0cm)" "$f".ps "$f".4ppf.ps >/dev/null 2>&1
+ mv "$f".4ppf.ps "$f".ps
+ fi
+ if [ $mode == "ps2pdf" ]
+ then
+ ps2pdf "$f".ps "$f".pdf >> ./"$f".ShLaTeX/ps2pdf.log 2>&1
+ if [ $? -ne 0 ]
+ then
+ echo -ne "\n";
+ cat ./"$f".ShLaTeX/ps2pdf.log
+ erreur "problem while converting in PDF!";
+ errconvert=1;
+ fi
+ fi
+ if [ $z -eq 1 ]
+ then
+ rm -f "$f".ps.gz
+ gzip "$f".ps > /dev/null 2>&1
+ fi
+ fi
+ fi
+ rm -f "$f".dvi
+fi
+
+## visualisation du fichier dvi, ps ou pdf
+if [ $errconvert -ne 1 -a $errbib -ne 1 -a $errindex -ne 1 -a $errcompil -ne 1 -a $view -eq 1 ]
+then
+ echo "> Launching viewer.";
+ case $mode in
+ "dvi" )
+ $v_dvi "$f".dvi >/dev/null 2>&1 & ;;
+ "dvips" )
+ if [ $z -eq 1 ]
+ then
+ $v_ps "$f".ps.gz >/dev/null 2>&1 &
+ else
+ $v_ps "$f".ps >/dev/null 2>&1 &
+ fi ;;
+ "ps2pdf" | "dvipdf" | "pdflatex" )
+ $v_pdf "$f".pdf >/dev/null 2>&1 & ;;
+ esac
+fi
+
+## affichage des messages d'erreur de compilation
+if [ $errcompil -eq 1 ]
+then
+ if [ $m -eq 0 ]
+ then
+ echo -ne "\n";
+ cat ./"$f".ShLaTeX/latex.log
+ fi
+ erreur "problem during compilation!";
+fi
+
+## suppression des temporaires et sortie
+suppressionTemp;
+fin;
diff --git a/support/shlatex/en/install b/support/shlatex/en/install
new file mode 100644
index 0000000000..dfb41032f9
--- /dev/null
+++ b/support/shlatex/en/install
@@ -0,0 +1,102 @@
+#!/bin/bash
+# Installation script for ShLaTeX
+# Warning : you must be root to run this script !
+# This script must be run in the ShLaTeX directory.
+
+# variables d'installation
+user=`whoami`;
+version="1.2b-en";
+
+# fichiers d'installation
+gpl="../GPL.TXT";
+src="../src";
+tex8to7="../src/tex8to7.c";
+man="./man/shlatex.1.bz2";
+shlatex="./ShLaTeX";
+todo="../TODO.TXT";
+fichInstall="$gpl $tex8to7 $man $shlatex $todo";
+
+# répertoires d'installation
+cheminMan="/usr/share/man/man1";
+cheminExec="/usr/bin";
+cheminScript="/usr/share";
+repInstall="$cheminMan $cheminExec $cheminScript";
+
+# vérification de l'identité de l'appelant
+if [ ! $user == "root" ]
+then
+ echo -ne "> Error : you must be 'root' to run this script\n";
+ echo -ne " See the README.TXT file for further details.\n";
+ exit 1;
+fi
+
+# vérification de l'abscence de cette version n'est pas déjà installée
+if [ -d "$cheminScript/shlatex-$version" ]
+then
+ echo "ShLaTeX $version is already installed on your system."
+ echo "Before re-installing, you have to uninstall."
+ exit 2;
+fi
+
+# vérification de l'existence des répertoires cibles, création le cas échéant
+for rep in $repInstall
+do
+ if [ ! -d "$rep" ]
+ then
+ echo -ne "> Avertissement : impossible de trouver \"$rep\", création du répertoire...\n";
+ mkdir -p "$rep"
+ fi
+done
+
+# vérification de l'existence des fichiers d'installation
+for fich in $fichiersInstall
+do
+ if [ ! -f "$fich" ]
+ then
+ echo -ne "> Erreur : impossible de trouver le fichier \"$fich\", ce fichier est nécessaire pour l'installation !\n";
+ exit 3;
+ fi
+done
+
+cat $gpl | more
+
+echo -ne "\n\n"
+
+rpse="-";
+until [ "$rpse" == "y" -o "$rpse" == "n" ]
+do
+ read -p "Do you agree the terms of the GNU GPL licence (y/n) ? " rpse
+done
+
+if [ ! "$rpse" == "y" ]
+then
+ echo "> Installation cancelled."
+ exit 1;
+fi
+
+clear
+
+echo -ne "> Installation in progress...\n"
+echo -ne "> Compiling...\n"
+gcc $tex8to7 -o tex8to7
+echo -ne "> Installation of tex8to7...\n"
+cp ./tex8to7 "$cheminExec/tex8to7"
+rm -f tex8to7
+chmod 755 "$cheminExec/tex8to7"
+echo -ne "> Installation of the man page...\n"
+cp $man "$cheminMan/shlatex.1.bz2"
+chmod 644 "$cheminMan/shlatex.1.bz2"
+echo -ne "> Installation of the script...\n"
+mkdir "$cheminScript/shlatex-$version"
+cp -fR * $gpl $src $todo "$cheminScript/shlatex-$version"
+chmod -R 755 "$cheminScript/shlatex-$version"
+if [ ! -L "$cheminExec/ShLaTeX" ]
+then
+ ln -s "$cheminScript/shlatex-$version/ShLaTeX" "$cheminExec/ShLaTeX"
+fi
+ln -s "$cheminScript/shlatex-$version/ShLaTeX" "$cheminExec/ShLaTeX-$version"
+echo -ne "> Test in progress...\n"
+cd "$cheminScript/shlatex-$version/test"
+chmod 755 ./test
+./test
+echo -ne "> Done.\n\n"
diff --git a/support/shlatex/en/man/cman b/support/shlatex/en/man/cman
new file mode 100644
index 0000000000..a0262dd427
--- /dev/null
+++ b/support/shlatex/en/man/cman
@@ -0,0 +1,21 @@
+#!/bin/bash
+# script de conversion du manuel en PDF et ascii.
+
+if [ ! -f shlatex.1 ]
+then
+ bunzip2 shlatex.1.bz2
+fi
+cp shlatex.1 "shlatex.help"
+groff -mandoc -Tps shlatex.1 > shlatex.ps
+bzip2 shlatex.1
+pstops -pa4 -w21cm -h29.7cm "1:0(-0.3cm,-1.5cm)" shlatex.ps shlatexA4.ps
+mv shlatexA4.ps shlatex.ps
+ps2pdf13 shlatex.ps
+rm -f shlatex.ps
+#acroread shlatex.pdf &
+
+rplc "\\" "\\\\" "`cat shlatex.help`" > "shlatex.help"
+rplc "\"" "\\\"" "`cat shlatex.help`" > "shlatex.help"
+manuel=`cat shlatex.help`;
+echo "echo \"$manuel\";" > "shlatex.help"
+
diff --git a/support/shlatex/en/man/shlatex.1.bz2 b/support/shlatex/en/man/shlatex.1.bz2
new file mode 100644
index 0000000000..7e5ef8969e
--- /dev/null
+++ b/support/shlatex/en/man/shlatex.1.bz2
Binary files differ
diff --git a/support/shlatex/en/man/shlatex.pdf b/support/shlatex/en/man/shlatex.pdf
new file mode 100644
index 0000000000..76b40c76f5
--- /dev/null
+++ b/support/shlatex/en/man/shlatex.pdf
Binary files differ
diff --git a/support/shlatex/en/test/biblio.bib b/support/shlatex/en/test/biblio.bib
new file mode 100644
index 0000000000..0d1b214207
--- /dev/null
+++ b/support/shlatex/en/test/biblio.bib
@@ -0,0 +1,7 @@
+@MANUAL{bib:manuel,
+ title= {User manual\index{U!User manual}},
+ author= {Mael Hilléreau},
+ month= {March},
+ year= {2003},
+ note= {Linux man page (type \texttt{man shlatex} to access it)},
+}
diff --git a/support/shlatex/en/test/externe.tex b/support/shlatex/en/test/externe.tex
new file mode 100644
index 0000000000..21a0631f2d
--- /dev/null
+++ b/support/shlatex/en/test/externe.tex
@@ -0,0 +1,3 @@
+\par It is possible to compile documents wich use the \verb|\input| and
+\verb|\include| commands to make references to some external files, and that in
+a transparent way by compiling only the main source file.
diff --git a/support/shlatex/en/test/test b/support/shlatex/en/test/test
new file mode 100644
index 0000000000..450336daf0
--- /dev/null
+++ b/support/shlatex/en/test/test
@@ -0,0 +1,15 @@
+#!/bin/bash
+# A small test for the ShLaTeX script
+
+version="1.2b-en";
+lignecom="ShLaTeX-$version -bib biblio.bib -toc -idx -dvips -z -2 -sep -no-tmp -no-m -8 -view -v-ps gv test.tex";
+
+$lignecom
+if [ $? -ne 0 ]
+then
+ echo -ne "> Error during the test!\n";
+else
+ echo -ne "> Test OK.\n";
+fi
+
+echo -ne "> Command used :\n$lignecom\n";
diff --git a/support/shlatex/en/test/test.tex b/support/shlatex/en/test/test.tex
new file mode 100644
index 0000000000..17aad94b4a
--- /dev/null
+++ b/support/shlatex/en/test/test.tex
@@ -0,0 +1,68 @@
+% Un petit test pour ShLaTeX
+\documentclass[a4paper,11pt]{article}
+
+\usepackage[frenchb]{babel}
+\usepackage{makeidx}
+\usepackage{graphicx}
+
+\newcommand{\shlatex}{\raisebox{0.05em}{\rotatebox{-6}{\scalebox{1.1}{S}}}\kern-0.2em\raisebox{-0.115em}{\rotatebox{14}{\scalebox{0.8}{$h$}}}\kern0.05em\LaTeX\xspace}
+
+\makeindex
+
+\title{\shlatex\footnote{A complete and up to date description is available in \cite{bib:manuel}.
+ }\ -- \LaTeX\ compilation script for Linux.}
+\author{Mael Hilléreau}
+\date{12$^{\textrm{\small th}}$ March, 2003}
+
+
+\begin{document}
+\maketitle
+\tableofcontents
+
+\section{Name}
+\par
+ \shlatex\index{S!\shlatex}\ -- \LaTeX\index{L!\LaTeX}\ compilation script for Linux.
+
+\section{Synopsis\index{S!Synopsis}}
+\par
+ \texttt{ShLaTeX [}\textit{options}\texttt{]} \texttt{sourceFile.tex}
+
+\section{Description}
+
+\subsection{A begining}
+
+\par This script allows to centralize the many program calls necessary to completely
+compile a \LaTeX\ document. In particular, the multiple calls to the \texttt{latex}
+command necessary in order to create a \index{T!table of contents}, a
+\textsc{Bib}\TeX\index{B!\textsc{Bib}\TeX} \index{B!bibliography} or an
+index\index{I!Index} are carried out automatically. Are also managed the calls to
+the programs \texttt{bibtex\index{B!bibtex}} and \texttt{makeindex\index{M!makeindex}}
+as well as the vizualisation of the resulting file (in DVI, PostScript or PDF format)
+by calling an external program.
+
+\input{externe.tex}
+
+\subsection{A continuation} \par Once compilation done, the temporary files are
+erased (option \textbf{-no-tmp}) or preserved (option \texttt{-tmp}). The DVI file
+generated by \LaTeX\ can then directly be converted\index{C!Conversion} to the
+PostScript or PDF formats. [\dots]
+
+\subsection{The continuation of a continuation}
+
+\par This script also provides the stressing of the French characters by the
+intermediary of an external C program (named \texttt{tex8to7}) and provided with the
+script. It also manages the C cedilla as well as the replacement of the quotation marks
+by the \verb|\og| and \verb|\fg| commands (supposing that the quotation marks are
+coupled). The quotation marks can be imbricated by using accodances for distinguishing
+the different quotation mark couples.
+
+\subsection{The continuation of the continuation of a continuation}
+
+\par Well, now I don't want to say anymore\dots
+
+\newpage
+ \bibliographystyle{alpha}
+ \bibliography{biblio.bib}
+
+\printindex
+\end{document}
diff --git a/support/shlatex/en/uninstall b/support/shlatex/en/uninstall
new file mode 100644
index 0000000000..f6e5565389
--- /dev/null
+++ b/support/shlatex/en/uninstall
@@ -0,0 +1,38 @@
+#!/bin/bash
+# Uninstall script for ShLaTeX
+# Warning : you must be root to run this script !
+
+user=`whoami`;
+version="1.2b-en";
+cheminMan="/usr/share/man/man1";
+cheminExec="/usr/bin";
+cheminScript="/usr/share";
+
+if [ ! $user == "root" ]
+then
+ echo "> Error : you must be 'root' to run this script";
+ echo " See the README.TXT file for further details.";
+ exit 1;
+fi
+
+if [ ! -d "$cheminScript/shlatex-$version" ]
+then
+ echo "> Warning : the script ShLaTeX-$version doesn't seem to be installed !";
+fi
+
+echo -ne "\n> Uninstall in progress...\n"
+cd /
+
+rm -f "$cheminExec/ShLaTeX-$version"
+rm -f "$cheminMan/shlatex.1.bz2"
+rm -fr "$cheminScript/shlatex-$version"
+if [ "`ls $cheminScript | grep "^shlatex-"`" == "" ]
+then
+ rm -f "$cheminExec/tex8to7"
+ rm -f "$cheminExec/ShLaTeX"
+else
+ echo "> Warning : another version of ShLaTeX seems to be present"
+ echo " The program tex8to7 hasn't been removed."
+fi
+echo -ne "> Done.\n\n"
+cd -