Ajout de la version PDF du manuel

git-svn-id: http://caml.inria.fr/svn/ocamldoc/trunk@9774 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Xavier Leroy 1998-08-04 11:38:32 +00:00
parent a84a9e8b41
commit e3613bce7e
43 changed files with 107 additions and 5 deletions

View File

@ -7,12 +7,20 @@ CSLDIR=../../csl
manual: files
cd texstuff; \
TEXINPUTS=$(TEXINPUTS) pdfolatex manual.tex
TEXINPUTS=$(TEXINPUTS) latex manual.tex
index::
cd texstuff; makeindex manual.idx
cd texstuff; makeindex manual.kwd.idx
pdfmanual: files
cd texstuff; \
TEXINPUTS=$(TEXINPUTS) pdfolatex pdfmanual.tex
index::
cd texstuff; makeindex pdfmanual.idx
cd texstuff; makeindex pdfmanual.kwd.idx
plaintext: files
cd texstuff; \
TEXINPUTS=$(TEXINPUTS) TEXFONTS=$(TEXFONTS) latex plaintext.tex
@ -37,10 +45,10 @@ files: $(FILES)
cd tutorials; $(MAKE) all
all:
$(MAKE) manual plaintext
$(MAKE) manual plaintext
$(MAKE) manual pdfmanual plaintext
$(MAKE) manual pdfmanual plaintext
$(MAKE) index
$(MAKE) manual plaintext
$(MAKE) manual pdfmanual plaintext
$(MAKE) html
clean:
rm -f $(FILES)
@ -52,7 +60,7 @@ clean:
release:
gzip < texstuff/manual.dvi > $(RELEASE)refman.dvi.gz
dvips -Pps -o '!gzip > $(RELEASE)refman.ps.gz' texstuff/manual.dvi
dvips -Php11rv -o '!gzip > $(RELEASE)refman.ps.gz' texstuff/manual.dvi
cp texstuff/plaintext.txt $(RELEASE)refman.txt
cp texstuff/plaintext.ipr $(RELEASE)refman.prn
tar cf - htmlman/*.* | gzip > $(RELEASE)refman.html.tar.gz

View File

@ -1,4 +1,5 @@
\chapter{Batch compilation (ocamlc)} \label{c:camlc}
\pdfchapter{Batch compilation (ocamlc)}
This chapter describes the Objective Caml batch compiler "ocamlc",
which compiles Caml source files to bytecode object files and link

View File

@ -1,4 +1,5 @@
\chapter{The debugger (ocamldebug)} \label{c:debugger}
\pdfchapter{The debugger (ocamldebug)}
This chapter describes the Objective Caml source-level replay debugger
"ocamldebug".

View File

@ -1,4 +1,5 @@
\chapter{Dependency generator (ocamldep)} \label{c:camldep}
\pdfchapter{Dependency generator (ocamldep)}
The "ocamldep" command scans a set of Objective Caml source files
(".ml" and ".mli" files) for references to external compilation units,

View File

@ -1,4 +1,5 @@
\chapter{Interfacing C with Objective Caml} \label{c:intf-c}
\pdfchapter{Interfacing C with Objective Caml}
This chapter describes how user-defined primitives, written in C, can
be linked with Caml code and called from Caml functions.

View File

@ -1,5 +1,6 @@
\chapter{Lexer and parser generators (ocamllex, ocamlyacc)}
\label{c:ocamlyacc}
\pdfchapter{Lexer and parser generators (ocamllex, ocamlyacc)}
This chapter describes two program generators: "ocamllex", that
produces a lexical analyzer from a set of regular expressions with

View File

@ -1,4 +1,5 @@
\chapter{Native-code compilation (ocamlopt)} \label{c:nativecomp}
\pdfchapter{Native-code compilation (ocamlopt)}
This chapter describes the Objective Caml high-performance
native-code compiler "ocamlopt", which compiles Caml source files to

View File

@ -1,4 +1,5 @@
\chapter{Profiling (ocamlprof)} \label{c:profiler}
\pdfchapter{Profiling (ocamlprof)}
This chapter describes how the execution of Objective Caml
programs can be profiled, by recording how many times functions are

View File

@ -1,4 +1,5 @@
\chapter{The runtime system (ocamlrun)} \label{c:runtime}
\pdfchapter{The runtime system (ocamlrun)}
The "ocamlrun" command executes bytecode files produced by the
linking phase of the "ocamlc" command.

View File

@ -1,4 +1,5 @@
\chapter{The toplevel system (ocaml)} \label{c:camllight}
\pdfchapter{The toplevel system (ocaml)}
This chapter describes the toplevel system for Objective Caml, that permits interactive use of the Objective Caml system
through a read-eval-print loop. In this mode, the system repeatedly

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -1,4 +1,5 @@
\chapter{The core library} \label{c:stdlib}
\pdfchapterfold{-1}{The core library}
This chapter describes the functions provided by the Caml Light
core library module: module "Pervasives". This module is special in two

View File

@ -1,4 +1,5 @@
\chapter{The dbm library: access to NDBM databases}
\pdfchapterfold{-1}{The dbm library: access to NDBM databases}
The "dbm" library provides access to NDBM databases under Unix.
NDBM databases maintain key/data associations, where both the key and

View File

@ -1,4 +1,5 @@
\chapter{The dynlink library: dynamic loading and linking of object files}
\pdfchapterfold{-1}{The dynlink library: dynamic loading and linking of object files}
The "dynlink" library supports type-safe dynamic loading and linking
of bytecode object files (".cmo" and ".cma" files) in a running

View File

@ -1,4 +1,5 @@
\chapter{The graphics library}
\pdfchapterfold{-1}{The graphics library}
The "graphics" library provides a set of portable drawing primitives.
Drawing takes place
@ -57,6 +58,12 @@ and angles are measured counterclockwise (in degrees).
Drawing is clipped to the screen.
%
\begin{latexonly}
\ifpdf
\begin{center}
\leavevmode
\pdfimage width 10cm ../library/libgraph.png
\end{center}
\else
\begin{center}
\setlength{\unitlength}{0.5mm}
\begin{picture}(130,100)(-10,-10)
@ -79,7 +86,12 @@ Drawing is clipped to the screen.
\put(-10,40){\makebox(0,0)[r]{$y$}}
\end{picture}
\end{center}
\fi
\end{latexonly}
\begin{htmlonly}
<P ALIGN="center"><IMG SRC="libgraph.gif"></P>
\end{htmlonly}
%
\begin{library}

View File

@ -1,4 +1,5 @@
\chapter{The num library: arbitrary-precision rational arithmetic}
\pdfchapterfold{-2}{The num library: arbitrary-precision rational arithmetic}
The "num" library implements
exact-precision rational arithmetic. It is built upon the

View File

@ -1,4 +1,5 @@
\chapter{The str library: regular expressions and string processing}
\pdfchapterfold{-1}{The str library: regular expressions and string processing}
The "str" library provides high-level string processing functions,
some based on regular expressions. It is intended to support the kind

View File

@ -1,5 +1,6 @@
\chapter{The threads library}
\label{c:threads}
\pdfchapterfold{-5}{The threads library}
The "threads" library allows concurrent programming in Objective Caml.
It provides multiple threads of control (also called lightweight

View File

@ -1,4 +1,5 @@
\chapter{The unix library: Unix system calls}
\pdfchapterfold{-1}{The unix library: Unix system calls}
The "unix" library makes many Unix
system calls and system-related library functions available to

View File

@ -1,4 +1,5 @@
\chapter{The standard library}
\pdfchapterfold{-28}{The standard library}
This chapter describes the functions provided by the Caml Light
standard library. The modules from the standard library are

View File

@ -187,6 +187,28 @@
\def\rminalltt#1{{\rm #1}}
% PDF stuff
\ifpdf
\newcount\pdflabel
\pdflabel=1
\def\pdfchapterfold#1#2{
\pdfdest num \pdflabel fit
\pdfoutline goto num \pdflabel count #1 {\arabic{chapter}. #2}
\global\advance\pdflabel by 1
}
\def\pdfsection#1{
\pdfdest num \pdflabel fit
\pdfoutline goto num \pdflabel {#1}
\global\advance\pdflabel by 1
}
\else
\def\pdfchapterfold#1#2{}
\def\pdfsection#1{}
\fi
\def\pdfchapter{\pdfchapterfold{0}}
%%% Fin des hacks
\makeatother

View File

@ -2,6 +2,8 @@
\newif\ifplaintext
\plaintextfalse
\newif\ifpdf
\pdffalse
\input macros.tex
\raggedbottom
\input allfiles.tex

View File

@ -0,0 +1,14 @@
\pdfoutput=1
\pdfpagewidth=21cm
\pdfpageheight=11in
\pdfcompresslevel=7
\documentstyle[11pt,fullpage,syntaxdef,alltt,altindex,makeidx,multicols,html,caml-sl]{book}
\newif\ifplaintext
\plaintextfalse
\newif\ifpdf
\pdftrue
\input macros.tex
\raggedbottom
\input allfiles.tex

View File

@ -2,5 +2,7 @@
\newif\ifplaintext
\plaintexttrue
\newif\ifpdf
\pdffalse
\input macros.tex
\input allfiles.tex

View File

@ -1,4 +1,5 @@
\section{Classes}
\pdfsection{Classes}
\subsection{Class definitions} \label{s:classdef}

View File

@ -1,4 +1,5 @@
\section{Compilation units}
\pdfsection{Compilation units}
\begin{syntax}
unit-interface: { specification [';;'] }

View File

@ -1,4 +1,5 @@
\section{Constants}
\pdfsection{Constants}
\begin{syntax}
constant:

View File

@ -1,4 +1,5 @@
\section{Expressions} \label{s:value-expr}
\pdfsection{Expressions}
\ikwd{in\@\verb`in`|see{\verb`let`}}
\ikwd{and\@\verb`and`|see{\verb`let`, \verb`type`}}
\ikwd{rec\@\verb`rec`|see{\verb`let`}}

View File

@ -1,4 +1,5 @@
\chapter{Language extensions} \label{c:extensions}
\pdfchapter{Language extensions}
This chapter describes the language features that are implemented in
Objective Caml, but not described in the Objective Caml

View File

@ -1,4 +1,5 @@
\section{Lexical conventions}
\pdfsection{Lexical conventions}
\subsubsection*{Blanks}

View File

@ -1,4 +1,5 @@
\section{Module types (module specifications)}
\pdfsection{Module types (module specifications)}
Module types are the module-level equivalent of type expressions: they
specify the general shape and type properties of modules.

View File

@ -1,4 +1,5 @@
\section{Module expressions (module implementations)} \label{s:module-expr}
\pdfsection{Module expressions (module implementations)}
Module expressions are the module-level equivalent of value
expressions: they evaluate to modules, thus providing implementations

View File

@ -1,4 +1,5 @@
\section{Names} \label{s:names}
\pdfsection{Names}
Identifiers are used to give names to several classes of language
objects and refer to these objects by name later:

View File

@ -1,4 +1,5 @@
\section{Patterns}
\pdfsection{Patterns}
\ikwd{as\@\verb`as`}
\begin{syntax}

View File

@ -1,4 +1,5 @@
\chapter{The Objective Caml language} \label{c:refman}
\pdfchapterfold{-12}{Reference manual for the Objective Caml language}
\section*{Foreword}

View File

@ -1,4 +1,5 @@
\section{Type and exception definitions}
\pdfsection{Type and exception definitions}
\subsection{Type definitions}

View File

@ -1,4 +1,5 @@
\section{Type expressions}
\pdfsection{Type expressions}
\ikwd{as\@\verb`as`}

View File

@ -1,4 +1,5 @@
\section{Values}
\pdfsection{Values}
This section describes the kinds of values that are manipulated by
Caml Light programs.

View File

@ -1,4 +1,5 @@
\chapter{The core language} \label{c:core-xamples}
\pdfchapter{Tutorial: The core language}
This part of the manual is a tutorial introduction to the Objective
Caml language. A good familiarity with programming in a conventional

View File

@ -1,4 +1,5 @@
\chapter{The module system} \label{c:moduleexamples}
\pdfchapter{Tutorial: The module system}
This chapter introduces the module system of Objective Caml.

View File

@ -1,5 +1,7 @@
\chapter{Objects in Caml}
\label{c:objectexamples}
\pdfchapter{Tutorial: Objects in Caml}
{\it (Chapter written by Jérôme Vouillon and Didier Rémy)}
\bigskip

View File

@ -20,6 +20,10 @@ print "\\section{$_}\n\n";
$label = $modname; $label =~ s/[^A-Za-z0-9]//g;
print "\\label{s:$label}\n";
print "\\index{$modname (module)@\\verb`$modname` (module)}%\n\n";
s/{\\tt //g;
s/}//g;
s/_//g;
print "\\pdfsection{$_}\n\n";
$incomment = 0;
$inverbatim = 0;

View File

@ -130,5 +130,8 @@ def_macro "\\caml" [Print "<pre>"];
def_macro "\\endcaml" [Print "</pre>"];
def_macro "\\rminalltt" [Print_arg];
def_macro "\\event" [Print "<font color=\"red\">*</font>"];
def_macro "\\pdfchapter" [Skip_arg];
def_macro "\\pdfchapterfold" [Skip_arg; Skip_arg];
def_macro "\\pdfsection" [Skip_arg];
();;