Skip to content

Commit

Permalink
Merge pull request #10247 from johnwhitington/refman-examples
Browse files Browse the repository at this point in the history
Add initial tranche of examples to reference manual
  • Loading branch information
Octachron committed Mar 5, 2021
2 parents 2046041 + cb6e79c commit 7a9a8dd
Show file tree
Hide file tree
Showing 7 changed files with 629 additions and 31 deletions.
6 changes: 6 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ Working version

### Manual and documentation:

- #10247: Add initial tranche of examples to reference manual.
Adds some eighty examples to the reference manual, principally to the
expressions and patterns sections.
(John Whitington, review by Xavier Leroy, Gabriel Scherer, @Fourchaux, and
Florian Angeletti)

- #9786, #10181: improved documentation of Unix.{in,out}_channel_of_descr
with respect to closing.
(Xavier Leroy, report by Jacques-Henri Jourdan, review by Guillaume
Expand Down
20 changes: 18 additions & 2 deletions manual/src/manual.tex
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
\documentclass[11pt]{book}
\usepackage{ae}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
% HEVEA\@def@charset{UTF-8}%
% Unicode character declarations
\DeclareUnicodeCharacter{207A}{{}^{+}}
\DeclareUnicodeCharacter{2014}{---}

\usepackage{fullpage}
\usepackage{syntaxdef}
\usepackage{multind}
Expand All @@ -19,8 +24,11 @@
\usepackage[normalem]{ulem}% for underlining errors in code examples

\input{macros.tex}
% Listing environments
\lstnewenvironment{camloutput}{
\lstset{
inputencoding=utf8,
extendedchars=true,
basicstyle=\small\ttfamily\slshape,
showstringspaces=false,
language=caml,
Expand All @@ -38,14 +46,19 @@
\else
\lstset{
upquote=true,
literate={'"'}{\textquotesingle "\textquotesingle}3
literate=%
{⁺}{{${}^{+}$}}1%
{—}{{---}}1%
{'"'}{\textquotesingle "\textquotesingle}3%
{'\\"'}{\textquotesingle \textbackslash"\textquotesingle}4,
}
\fi
}{}
\lstnewenvironment{camlinput}{
\lstset{
inputencoding=utf8,
extendedchars=true,
basicstyle=\ttfamily,
showstringspaces=false,
language=caml,
Expand All @@ -67,7 +80,10 @@
%not implemented in hevea: upquote and literate
\lstset{
upquote=true,
literate={'"'}{\textquotesingle "\textquotesingle}3
literate=%
{⁺}{{${}^{+}$}}1%
{—}{{---}}1%
{'"'}{\textquotesingle "\textquotesingle}3%
{'\\"'}{\textquotesingle \textbackslash"\textquotesingle}4,
}
\fi
Expand Down

0 comments on commit 7a9a8dd

Please sign in to comment.