Ajout de la version PDF du manuel
git-svn-id: http://caml.inria.fr/svn/ocamldoc/trunk@9774 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
a84a9e8b41
commit
e3613bce7e
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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".
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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 |
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
\newif\ifplaintext
|
||||
\plaintextfalse
|
||||
\newif\ifpdf
|
||||
\pdffalse
|
||||
\input macros.tex
|
||||
\raggedbottom
|
||||
\input allfiles.tex
|
||||
|
|
|
@ -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
|
|
@ -2,5 +2,7 @@
|
|||
|
||||
\newif\ifplaintext
|
||||
\plaintexttrue
|
||||
\newif\ifpdf
|
||||
\pdffalse
|
||||
\input macros.tex
|
||||
\input allfiles.tex
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
\section{Classes}
|
||||
\pdfsection{Classes}
|
||||
|
||||
\subsection{Class definitions} \label{s:classdef}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
\section{Compilation units}
|
||||
\pdfsection{Compilation units}
|
||||
|
||||
\begin{syntax}
|
||||
unit-interface: { specification [';;'] }
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
\section{Constants}
|
||||
\pdfsection{Constants}
|
||||
|
||||
\begin{syntax}
|
||||
constant:
|
||||
|
|
|
@ -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`}}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
\section{Lexical conventions}
|
||||
\pdfsection{Lexical conventions}
|
||||
|
||||
\subsubsection*{Blanks}
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
\section{Patterns}
|
||||
\pdfsection{Patterns}
|
||||
\ikwd{as\@\verb`as`}
|
||||
|
||||
\begin{syntax}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
\chapter{The Objective Caml language} \label{c:refman}
|
||||
\pdfchapterfold{-12}{Reference manual for the Objective Caml language}
|
||||
|
||||
\section*{Foreword}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
\section{Type and exception definitions}
|
||||
\pdfsection{Type and exception definitions}
|
||||
|
||||
\subsection{Type definitions}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
\section{Type expressions}
|
||||
\pdfsection{Type expressions}
|
||||
|
||||
\ikwd{as\@\verb`as`}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
\section{Values}
|
||||
\pdfsection{Values}
|
||||
|
||||
This section describes the kinds of values that are manipulated by
|
||||
Caml Light programs.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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];
|
||||
();;
|
||||
|
||||
|
|
Loading…
Reference in New Issue