summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/fonts/frcursive/fcsource.tex
blob: 04d214fb7a07f6b762aaf0cb4e5f0629c579cbdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
% This files contains macros used to pretty-print the Metafont source file of
% the French-Cursive typeface. It acts as a driver file: compile it after
% processing frcursive.mf through mft to get the DVI document. The font itself
% must be available since it is used in the source's comments.

%-- some fonts

\font\tentex=ectt10
\font\eightrm=cmr8
\font\tensc=cmcsc10
\font\titlefont=cmcsc14
\font\fc=frcr10
\tenrm

%-- some useful macros

\def\cs#1{{\tt\string#1}}
\def\item{%
  \par\noindent%
  --\kern 1.5ex\relax}
\def\deflist#1{\halign{\kern\parindent\relax##\hfil&\ = ##\hfil\cr#1}}

%-- a nice title

\def\title#1,#2.{%
  \begingroup%
  \parindent=0pt%
  \parfillskip=0pt%
  \leftskip=3em plus 1fil%
  \rightskip=\leftskip%
  {\titlefont #1}\medskip
  {\tensc \let\cr\medskip \ignorespaces #2}\bigskip%
  \vrule height 0.4pt width 10cm\bigskip%
  \endgroup}

%-- sectioning

\newwrite\tocfile
\openout\tocfile=\jobname.toc

\newcount\secnum
\outer\def\sec#1.{%
  \par\vfil\break%
  \advance\secnum1\relax\subsecnum0%
  \sechead{$\oldstyle\the\secnum.$ #1}%
  \write\tocfile{\noexpand\tocsec{\the\pageno}{\the\secnum}{#1}}}

\def\sechead#1{%
  \centerline{\tensc #1}%
  \centerline{\vrule height 0.4pt width 5em}%
  \bigskip}

\newcount\subsecnum
\outer\def\subsec#1.{%
  \medbreak%
  \advance\subsecnum1%
  \centerline{\it\the\subsecnum. #1.}%
  \smallskip}

%-- generating the toc file

\def\tocsec#1#2#3{%
  \medskip%
  \line{\kern2cm%
    \hbox to 7mm{$\oldstyle#2.$\hfil}#3 \xleaders\hbox{ . }\hfil\ #1%
    \kern2cm}}

%-- input the processed Metafont source

\input frcursive

%-- generating the table of contents

\closeout\tocfile

\vfill\eject
\nopagenumbers
\topskip 0pt plus 1fill
\sechead{Table of contents}
\input\jobname.toc
\vfill

\end