summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/metapost/drv/doc/drv-guide.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/metapost/drv/doc/drv-guide.tex')
-rw-r--r--Master/texmf-dist/doc/metapost/drv/doc/drv-guide.tex154
1 files changed, 105 insertions, 49 deletions
diff --git a/Master/texmf-dist/doc/metapost/drv/doc/drv-guide.tex b/Master/texmf-dist/doc/metapost/drv/doc/drv-guide.tex
index 4c8ea3606c7..e90bc73ac5c 100644
--- a/Master/texmf-dist/doc/metapost/drv/doc/drv-guide.tex
+++ b/Master/texmf-dist/doc/metapost/drv/doc/drv-guide.tex
@@ -1,9 +1,13 @@
+%\enlargethispage
+%\pagebreak
+
% Any piece of code related to font selection in the following preamble
% (document class, font package, font selection commands ...) should be
% reported in `drv-guide.mp'.
\documentclass[twoside,11pt]{article}
\usepackage[T1]{fontenc}
+\usepackage{microtype}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{stmaryrd}
@@ -88,9 +92,9 @@ derivation trees with \MP%
\thanks{Feel free to improve! (E.g., by correcting the poor English.)
Last update: \today.}}}
\author{Laurent \textsc{M\'ehats}\\
-{\small\href{mailto:laurent.mehats@gmail.com?subject=[drv 0.96]}
+{\small\href{mailto:laurent.mehats@gmail.com?subject=[drv 0.97]}
{\texttt{laurent.mehats@gmail.com}}}}
-\date{documented version: 0.96}
+\date{documented version: 0.97}
\pagestyle{myheadings}
\renewcommand{\sectionmark}[1]{%
@@ -965,7 +969,6 @@ relatively to its premises.\\[1ex]
\drv{drv-guide.321}&
\end{array}
\end{gather*}
-\enlargethispage{.25\baselineskip}%
Setting a default position for delimiter labels (thus for delimiters) and for
phantom steps labels may be useful in conjunction with declaration macros
taking optional label arguments (see~\S~\ref{sec-labels}).
@@ -975,7 +978,6 @@ taking optional label arguments (see~\S~\ref{sec-labels}).
\subsection{\texttt{drv\_roots\_position}\label{sec-roots-position}}
%
%
-%\begin{multicols}{2}
\texttt{drv\_roots\_position \param{id}}\\
\begin{tabular}{ll}
\param{id}& position identifier ({\tt t} or {\tt b})\\
@@ -1033,7 +1035,7 @@ Notice that \texttt{drv\_axis\_reference} is irrelevant if you don't use the
\texttt{"\tbs{}langle"}& $\langle$\\
etc.
\end{tabular}
-\end{tabular}\\[1ex]
+\end{tabular}\clearpage\noindent%\\[1ex]
\texttt{drv\_right\_delimiter \param{str}}\\
\begin{tabular}{ll}
\param{str}& right delimiter math-mode \LaTeX\ code\\
@@ -1101,7 +1103,7 @@ typeset as&
\subsection{\texttt{drv\_fraction\_mode}\label{sec-fraction-mode}}
%
%
-\nopagebreak\parbox{\textwidth}{\texttt{drv} typesets derivation trees in
+\texttt{drv} typesets derivation trees in
such a way that: the distance from the axis of an inference line to the
math axis of a judgment above it is always the same (\texttt{num\_hg},
see~\S~\ref{sec-components}); the distance from the axis of an inference line
@@ -1112,7 +1114,7 @@ ignored (the depth of root judgments is always ignored); if roots are at top
then the depth of leaf judgments below which there is no inference line is
ignored (the height of root judgments is always ignored). This mode may cause
overlaps when used in conjunction with
-interlacing junction-styles (\texttt{0} and \texttt{1}).}\\[1ex]
+interlacing junction-styles (\texttt{0} and \texttt{1}).\\[1ex]
\texttt{drv\_fraction\_mode \param{id}}\\
\begin{tabular}{ll}
\param{id}& status identifier ({\tt on} or {\tt off})\\
@@ -1157,6 +1159,39 @@ see~\S~\ref{sec-components}) while blue numbers (resp. dots) refer to
sub-judgment indices (resp. central points, see~\S~\ref{sec-components}).
%
%
+\subsection{\texttt{drv\_labels\_mode}\label{sec-labels-mode}}
+%
+%
+This macro turns the typesetting of labels on or off, whether labels are
+specified or~not.\\[1ex]
+\texttt{drv\_labels\_mode (\param{id 1}, \param{id 2})}\\
+\begin{tabular}{ll}
+\param{id 1}& label-type identifier ({\tt ilb}, {\tt plb} or {\tt dlb})\\
+& \begin{tabular}{lll}
+ {\tt ilb} &inference labels&
+ \default[ status: {\tt on}]\\
+ {\tt dlb} &delimiter labels&
+ \default[ status: {\tt on}]\\
+ {\tt plb} &phantom steps labels&
+ \default[ status: {\tt on}]
+ \end{tabular}\\
+\param{id 2}& status identifier ({\tt on} or {\tt off})
+\end{tabular}
+%
+%
+\subsection{\texttt{drv\_verbatimtex}\label{sec-verbatimtex}}
+%
+%
+This macro enables the use of \LaTeX{} material that is not intended
+to be typeset (e.g. \texttt{\tbs{}renewcommand} statements) by adding a
+\MP{} \texttt{verbatimtex}/\texttt{etex} block to
+\texttt{\param{jobname}-delayed.mp}.\\[1ex]
+\texttt{drv\_verbatimtex \param{str}}\\
+\begin{tabular}{ll}
+\param{str}& \LaTeX\ material
+\end{tabular}
+%
+%
\section{Pictures, bounding boxes and math axis\label{sec-pictures}}
%
%
@@ -1216,7 +1251,7 @@ endfig;
%
%
\texttt{drv\_axis} locally overrides \texttt{drv\_axis\_reference} (see
-\S~\ref{sec-axis-reference}), allowing you to explicitly set
+\S~\ref{sec-axis-reference}), enabling the explicit setting of
the math axis of a tree once it has been drawn.\\[1ex]
\texttt{drv\_axis (\param{id}, \param{nat})}\\
\begin{tabular}{ll}
@@ -1257,9 +1292,8 @@ Notice that \texttt{drv\_axis} is irrelevant if you don't use the
\paragraph{\texttt{NFR}}
%
%
-\enlargethispage{.05\baselineskip}%
-The \texttt{NFR} declaration macro is the lowest level one. It allows you to
-specify all the labels and styles of an inference.\\[1ex]
+The \texttt{NFR} declaration macro is the lowest level one. It enables the
+specification of all the labels and styles of an inference.\\[1ex]
\texttt{NFR
\param{nat}
(\param{nat\;list})
@@ -1340,8 +1374,8 @@ endfig;
\paragraph{\texttt{MVD}}
%
%
-The \texttt{MVD} macro is a generalization of \texttt{Mvd} that allows you to
-specify the alignment style of phantom inferences.\\[1ex]
+The \texttt{MVD} macro is a generalization of \texttt{Mvd} that enables the
+specification of the alignment style of phantom inferences.\\[1ex]
\texttt{MVD \param{nat 1}
(\param{nat 2}, \param{str 1}, \param{str 2}, \param{id 1}, \param{id 2})}\\
\begin{tabular}{ll}
@@ -1374,8 +1408,7 @@ endfig;
\begin{gather*}
\drv{drv-guide.450}
\end{gather*}
-\end{multicols}
-\pagebreak
+\end{multicols}\clearpage
\begin{Verbatim}
beginfig(460)
jgm 0 "\textsc{Size matters -- Part 2}";
@@ -1517,29 +1550,52 @@ dimensions\label{sec-components}}
%
%
Once \texttt{drv\_freeze} has been called, all the components of a derivation
-tree are accessible independently from each-other.
+tree are accessible independently from each-other. Given an inference
+index~\param{nat}, you can access the inference components (provided they were
+declared) via the following indentifiers.
+\begin{center}
+\begin{tabular}{lr}
+judgment &\texttt{jdg[\param{nat}]}\\
+sub-judgments &\texttt{sbj[\param{nat}][\param{nat$'$}]}\\
+inference line &\texttt{iln[\param{nat}]}\\
+left inference label &\texttt{l\_ilb[\param{nat}]}\\
+right inference label &\texttt{r\_ilb[\param{nat}]}\\
+left delimiter &\texttt{l\_dlm[\param{nat}]}\\
+left delimiter label &\texttt{l\_dlb[\param{nat}]}\\
+right delimiter &\texttt{r\_dlm[\param{nat}]}\\
+right delimiter label &\texttt{r\_dlb[\param{nat}]}\\
+phantom steps path &\texttt{phm[\param{nat}]}\\
+left phantom steps label &\texttt{l\_plb[\param{nat}]}\\
+right phantom steps label &\texttt{l\_plb[\param{nat}]}
+\end{tabular}
+\end{center}
+The sub-judgment index \param{nat$'$} ranges from 0 to the number of sub-judgments minus 1.
%
%
+\enlargethispage{\baselineskip}
\begin{Verbatim}
beginfig(470) % components
-DCL 6 () ("", "", "", "", _, _, 0) "0";
-DCL 7 (6) ("(1)", "(2)", "(3)", "(4)", _, _, 1) "A", "B";
+DCL 5 () ("", "", "", "", _, _, 0) "A";
+DCL 6 (5) ("(1)", "(2)", "(3)", "(4)", _, _, 1) "B", "C";
+DCL 7 (MVD 6 (2, "(5)", "(6)", _, 6)) ("", "", "", "", _, _, 1) "D";
drv_freeze; % usually called by drv_tree
-draw jdg[6]; % judgment 0
-draw sbj[7][0] withcolor (0, 0, 1); % sub-judgment A
-draw sbj[7][1] withcolor (0, 1, 0); % sub-judgment B
-draw l_ilb[7] withcolor (0, 1, 1); % left inference label (1)
-draw r_ilb[7] withcolor (1, 0, 0); % right inference label (2)
-draw l_dlb[7] withcolor (1, 0, 1); % left delimiter label (3)
-draw r_dlb[7] withcolor (1, 1, 0); % right delimiter label (4)
-draw l_dlm[7]; % left delimiter
-draw iln[7]; % inference line
-draw r_dlm[7]; % right delimiter
+draw jdg[5]; % judgment A
+draw sbj[6][0] withcolor (3, 0, 0)/3; % sub-judgment B
+draw sbj[6][1] withcolor (2, 0, 0)/3; % sub-judgment C
+draw iln[6] withcolor (0, 4, 0)/4; % inference line
+draw l_ilb[6] withcolor (0, 3, 0)/4; % left inference label (1)
+draw r_ilb[6] withcolor (0, 2, 0)/4; % right inference label (2)
+draw l_dlm[6] withcolor (0, 0, 3)/3; % left delimiter
+draw l_dlb[6] withcolor (0, 0, 2)/3; % left delimiter label (3)
+draw r_dlm[6] withcolor (3, 0, 3)/3; % right delimiter
+draw r_dlb[6] withcolor (2, 0, 2)/3; % right delimiter label (4)
+draw phm[6] withcolor (0, 3, 3)/4; % phantom steps path
+draw l_plb[6] withcolor (0, 2, 2)/4; % left phantom steps label (5)
+draw r_plb[6] withcolor (0, 1, 1)/4; % right phantom steps label (6)
+draw jdg[7]; % judgment D
+draw iln[7]; % inference line
endfig;
\end{Verbatim}
-%\begin{gather*}
-%\drv{drv-guide.470}\qquad\drv{drv-guide.471}
-%\end{gather*}
%
%
\paragraph{Distinguished points}
@@ -1584,7 +1640,7 @@ endfig;
\subsection{\texttt{drv\_styled}\label{sec-styled}}
%
%
-\texttt{drv\_styled} allows you to draw \MP\ paths
+\texttt{drv\_styled} enables the drawing of \MP\ paths
%(see~\cite[Section~4]{hobby09})
using \texttt{drv} path-styles.\\[1ex]
\texttt{\param{path} drv\_styled \param{id}}\\
@@ -1596,22 +1652,22 @@ using \texttt{drv} path-styles.\\[1ex]
\begin{Verbatim}
beginfig(490)
jgm 4 "A", "\vdash", "A";
-jgm 5 "B", "\vdash", "B";
-jgm 6 "A", ",", "A", "\multimap", "B", "\vdash", "B";
-jgm 7 "A", "\multimap", "B", "\vdash", "A", "\multimap", "B";
+jgm 5 "B", "_2", "\vdash", "B", "_3";
+jgm 6 "A", ",", "A", "\multimap", "B", "_1", "\vdash", "B", "_4";
+jgm 7 "A", "\multimap", "B", "_0", "\vdash", "A", "\multimap", "B", "_5";
nfr 4 () ("1", _);
nfr 5 () ("1", _);
nfr 6 (4, 5) ("\multimap_{L}", _);
nfr 7 (6) ("\multimap_{R}", _);
-drv_freeze;
-draw (sbj[7][2].c shifted (0, -num_hg) ..
- sbj[7][2].c {up} ..
- sbj[6][4].c ..
- sbj[5][0].c .. tension 1.05 ..
- sbj[5][2].c ..
- sbj[6][6].c ..
- sbj[7][6].c {down} ..
- sbj[7][6].c shifted (0, -num_hg))
+drv_freeze; % B
+draw (sbj[7][2].c shifted (0, -num_hg) .. % 0
+ sbj[7][2].c {up} .. % 0
+ sbj[6][4].c .. % 1
+ sbj[5][0].c .. tension 1.2 .. % 2
+ sbj[5][3].c .. % 3
+ sbj[6][7].c .. % 4
+ sbj[7][7].c {down} .. % 5
+ sbj[7][7].c shifted (0, -num_hg)) % 5
drv_styled 2 withcolor (1, 0, 0);
draw drv_tree;
endfig;
@@ -1878,7 +1934,7 @@ the first declared root (you can override this behaviour by using
%
%
\texttt{drv\_root} locally overrides \texttt{drv\_roots\_position} (see
-\S~\ref{sec-roots-position}), allowing you to explicitly set
+\S~\ref{sec-roots-position}), enabling the explicit setting of
the position of a root.\\[1ex]
\texttt{drv\_root (\param{nat}, \param{id})}\\
\begin{tabular}{ll}
@@ -1937,6 +1993,7 @@ jdg[10].c=jdg[20].c;
draw drv_tree;
endfig;
\end{Verbatim}
+\enlargethispage{\baselineskip}
(The resulting figure is in Appendix~\ref{sec-gallery} on
page~\pageref{fig-overlapping}.)
%
@@ -1944,8 +2001,8 @@ page~\pageref{fig-overlapping}.)
\section{Radial mode (beta version)\label{sec-radial}}
%
%
-A few more tuning macros (see~\S~\ref{sec-tunings}) are available that allow
-you to manipulate \emph{radial} trees rather than ``linear'' ones.
+A few more tuning macros (see~\S~\ref{sec-tunings}) are available that enable
+the manipulation of \emph{radial} trees rather than ``linear'' ones.
%
%
\subsection*{\texttt{drv\_radial\_mode}}
@@ -1995,7 +2052,6 @@ you to manipulate \emph{radial} trees rather than ``linear'' ones.
\end{gather*}
%
%
-\enlargethispage{1.75\baselineskip}%
\subsection*{\texttt{drv\_azimuth}}
%
%
@@ -2082,7 +2138,7 @@ Here are two simple derivation trees (figures~600,~601).
Here are the \texttt{drv} version of a derivation tree found
in~\cite[p.~57]{restall06} and an alternative for it (figures~610,~611).
\begin{gather*}
-\drv{drv-guide.610}
+\hbox to 0pt{\hss{\drv{drv-guide.610}}\hss}
\end{gather*}
\begin{gather*}
\drv{drv-guide.611}