From 5d4c8dc9b9eedf00ef981be81f2ac073102fb67f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 12 Jun 2010 23:28:12 +0000 Subject: mfpic update (11jun10) git-svn-id: svn://tug.org/texlive/trunk@18920 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/generic/mfpic/README | 4 +- Master/texmf-dist/doc/generic/mfpic/changes.txt | 10 +- .../texmf-dist/doc/generic/mfpic/examples/data.dat | 2 +- .../doc/generic/mfpic/examples/forfun.tex | 2 +- .../doc/generic/mfpic/examples/lapictures.tex | 2 +- .../doc/generic/mfpic/examples/pictures.tex | 2 +- Master/texmf-dist/doc/generic/mfpic/install.txt | 4 +- Master/texmf-dist/doc/generic/mfpic/mfpcard.pdf | Bin 154513 -> 145032 bytes Master/texmf-dist/doc/generic/mfpic/mfpcard.tex | 6 +- Master/texmf-dist/doc/generic/mfpic/mfpdoc.sty | 8 +- Master/texmf-dist/doc/generic/mfpic/mfpguide.pdf | Bin 381920 -> 344646 bytes Master/texmf-dist/doc/generic/mfpic/mfpguide.tex | 2 +- Master/texmf-dist/doc/generic/mfpic/mfpic-doc.pdf | Bin 766298 -> 528015 bytes Master/texmf-dist/doc/generic/mfpic/mfpic-doc.tex | 56 +- Master/texmf-dist/metafont/mfpic/grafbase.mf | 38 +- Master/texmf-dist/metapost/mfpic/dvipsnam.mp | 4 +- Master/texmf-dist/metapost/mfpic/grafbase.mp | 39 +- .../texmf-dist/source/generic/mfpic/grafbase.dtx | 986 ++++++++++++--------- Master/texmf-dist/source/generic/mfpic/mfpic.dtx | 464 +++++----- Master/texmf-dist/source/generic/mfpic/mfpic.ins | 4 +- Master/texmf-dist/tex/generic/mfpic/mfpic.sty | 6 +- Master/texmf-dist/tex/generic/mfpic/mfpic.tex | 15 +- Master/texmf-dist/tex/generic/mfpic/mfppatch.tex | 4 +- Master/tlpkg/libexec/ctan2tds | 1 + 24 files changed, 920 insertions(+), 739 deletions(-) (limited to 'Master') diff --git a/Master/texmf-dist/doc/generic/mfpic/README b/Master/texmf-dist/doc/generic/mfpic/README index 17fc0da1b1f..a18b8b5f682 100644 --- a/Master/texmf-dist/doc/generic/mfpic/README +++ b/Master/texmf-dist/doc/generic/mfpic/README @@ -1,5 +1,5 @@ %%% File: README -%%% A part of mfpic 1.04 2010/03/30 +%%% A part of mfpic 1.05 2010/06/10 %%% MFpic defines a command group \mfpic...\endmfpic (optionally in LaTeX @@ -16,7 +16,7 @@ features added since the previous official release (0.9). See the manual mfpic-doc.pdf for more detailed instructions and descriptions of features. -This is mfpic version 1.04. +This is mfpic version 1.05. LEGALITIES ---------- diff --git a/Master/texmf-dist/doc/generic/mfpic/changes.txt b/Master/texmf-dist/doc/generic/mfpic/changes.txt index f7c3f7419b8..3835ebf55c1 100644 --- a/Master/texmf-dist/doc/generic/mfpic/changes.txt +++ b/Master/texmf-dist/doc/generic/mfpic/changes.txt @@ -1,5 +1,5 @@ %%% File: changes.txt -%%% A part of mfpic 1.04 2010/03/30 +%%% A part of mfpic 1.05 2010/06/10 %%% Summaries of changes. @@ -923,3 +923,11 @@ Replaced corrupted PDF files mfpguide.pdf and mfpcard.pdf. Although \mfresolution and \mfmode were defined in mfpic.tex (and documented) grafbase did nothing with them. Corrected. +(no change in version; documentation changes only 2010/04/07) +Correct a wrong checksum and some typos in the dtx. Reformat the source +files grafbase.dtx and mfpic.dtx. + +1.05 +Name changes in grafbase ("GB" prefixed to romannumeral, etc.) \endgroup +moved in mfpic. + diff --git a/Master/texmf-dist/doc/generic/mfpic/examples/data.dat b/Master/texmf-dist/doc/generic/mfpic/examples/data.dat index 71bf04c458a..91d6d0fb9fe 100644 --- a/Master/texmf-dist/doc/generic/mfpic/examples/data.dat +++ b/Master/texmf-dist/doc/generic/mfpic/examples/data.dat @@ -1,5 +1,5 @@ ### File: data.dat -### A part of mfpic 1.04 2010/03/30 +### A part of mfpic 1.05 2010/06/10 ### # A file of data to plot a function curve # ("#", not "%", must be comment character when this is read.) diff --git a/Master/texmf-dist/doc/generic/mfpic/examples/forfun.tex b/Master/texmf-dist/doc/generic/mfpic/examples/forfun.tex index a48245ed12c..5b8c88fae76 100644 --- a/Master/texmf-dist/doc/generic/mfpic/examples/forfun.tex +++ b/Master/texmf-dist/doc/generic/mfpic/examples/forfun.tex @@ -1,5 +1,5 @@ %%% File: forfun.tex -%%% A part of mfpic 1.04 2010/03/30 +%%% A part of mfpic 1.05 2010/06/10 %%% \nopagenumbers \input mfpic.tex diff --git a/Master/texmf-dist/doc/generic/mfpic/examples/lapictures.tex b/Master/texmf-dist/doc/generic/mfpic/examples/lapictures.tex index 40ac3df48ed..3191a8ce15d 100644 --- a/Master/texmf-dist/doc/generic/mfpic/examples/lapictures.tex +++ b/Master/texmf-dist/doc/generic/mfpic/examples/lapictures.tex @@ -1,5 +1,5 @@ %%% File: lapictures.tex -%%% A part of mfpic 1.04 2010/03/30 +%%% A part of mfpic 1.05 2010/06/10 %%% % Magnify to same scale as pictures.tex : % (Use of \mag is against the law of LaTeX, but Bugs Bunny set a precedent.) diff --git a/Master/texmf-dist/doc/generic/mfpic/examples/pictures.tex b/Master/texmf-dist/doc/generic/mfpic/examples/pictures.tex index ebb9510bc41..03e247a27cc 100644 --- a/Master/texmf-dist/doc/generic/mfpic/examples/pictures.tex +++ b/Master/texmf-dist/doc/generic/mfpic/examples/pictures.tex @@ -1,5 +1,5 @@ %%% File: pictures.tex -%%% A part of mfpic 1.04 2010/03/30 +%%% A part of mfpic 1.05 2010/06/10 %%% \magnification=\magstep1 diff --git a/Master/texmf-dist/doc/generic/mfpic/install.txt b/Master/texmf-dist/doc/generic/mfpic/install.txt index 10b6e93234d..c334a7f4326 100644 --- a/Master/texmf-dist/doc/generic/mfpic/install.txt +++ b/Master/texmf-dist/doc/generic/mfpic/install.txt @@ -1,8 +1,8 @@ %%% File: install.txt -%%% A part of mfpic 1.04 2010/03/30 +%%% A part of mfpic 1.05 2010/06/10 %%% -This is version 1.04 of mfpic. See README.txt for a list of files and a +This is version 1.05 of mfpic. See README.txt for a list of files and a brief description of each. Generating and installing the files diff --git a/Master/texmf-dist/doc/generic/mfpic/mfpcard.pdf b/Master/texmf-dist/doc/generic/mfpic/mfpcard.pdf index 142401163ef..2b60fe2002c 100644 Binary files a/Master/texmf-dist/doc/generic/mfpic/mfpcard.pdf and b/Master/texmf-dist/doc/generic/mfpic/mfpcard.pdf differ diff --git a/Master/texmf-dist/doc/generic/mfpic/mfpcard.tex b/Master/texmf-dist/doc/generic/mfpic/mfpcard.tex index 44a73ee7b43..832e9095f77 100644 --- a/Master/texmf-dist/doc/generic/mfpic/mfpcard.tex +++ b/Master/texmf-dist/doc/generic/mfpic/mfpcard.tex @@ -1,5 +1,5 @@ %%% File: mfpcard.tex -%%% A part of mfpic 1.04 2010/03/30 +%%% A part of mfpic 1.05 2010/06/10 %%% % (Ask your driver to print so that longer dimension is horizontal.) \newdimen\paperlongside @@ -199,9 +199,9 @@ \title{MFPIC Quick Reference} -\centerline{(Copyright 2000--2009 by Daniel Luecking)} +\centerline{(Copyright 2000--2010 by Daniel Luecking)} \medskip -This information was prepared for version 1.04 of \prog{mfpic}. +This information was prepared for version 1.05 of \prog{mfpic}. \section{Preamble commands} diff --git a/Master/texmf-dist/doc/generic/mfpic/mfpdoc.sty b/Master/texmf-dist/doc/generic/mfpic/mfpdoc.sty index 4ed1c2abd7d..60b3648bf89 100644 --- a/Master/texmf-dist/doc/generic/mfpic/mfpdoc.sty +++ b/Master/texmf-dist/doc/generic/mfpic/mfpdoc.sty @@ -1,7 +1,7 @@ %%% File: mfpdoc.sty -%%% A part of mfpic 1.04 2010/03/30 +%%% A part of mfpic 1.05 2010/06/10 %%% -\ProvidesPackage{mfpdoc}[2010/03/30 v1.04 macros for mfpic documentation] +\ProvidesPackage{mfpdoc}[2010/06/10 v1.05 macros for mfpic documentation] \newif\if@chapters \@chaptersfalse @@ -21,8 +21,8 @@ \pdftrue \fi\fi\fi} -\newcommand\mfpversion{1.04} -\newcommand\mfpdate {2010/03/30} +\newcommand\mfpversion{1.05} +\newcommand\mfpdate {2010/06/10} %% Text size: diff --git a/Master/texmf-dist/doc/generic/mfpic/mfpguide.pdf b/Master/texmf-dist/doc/generic/mfpic/mfpguide.pdf index 43b26858496..5718f42d497 100644 Binary files a/Master/texmf-dist/doc/generic/mfpic/mfpguide.pdf and b/Master/texmf-dist/doc/generic/mfpic/mfpguide.pdf differ diff --git a/Master/texmf-dist/doc/generic/mfpic/mfpguide.tex b/Master/texmf-dist/doc/generic/mfpic/mfpguide.tex index 25e5f09d786..b0e720cc67a 100644 --- a/Master/texmf-dist/doc/generic/mfpic/mfpguide.tex +++ b/Master/texmf-dist/doc/generic/mfpic/mfpguide.tex @@ -1,5 +1,5 @@ %%% File: mfpguide.tex -%%% A part of mfpic 1.04 2010/03/30 +%%% A part of mfpic 1.05 2010/06/10 %%% % Tutorial on mfpic \documentclass[letterpaper]{article} diff --git a/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.pdf b/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.pdf index be7d80dbaba..617241cd511 100644 Binary files a/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.pdf and b/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.pdf differ diff --git a/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.tex b/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.tex index e420947df95..c818579dfd1 100644 --- a/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.tex +++ b/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.tex @@ -1,5 +1,5 @@ %%% File: mfpic-doc.tex -%%% A part of mfpic 1.04 2010/03/30 +%%% A part of mfpic 1.05 2010/06/10 %%% % Documentation of mfpic macros \documentclass[letterpaper]{article} @@ -29,7 +29,7 @@ \stepcounter{secnumdepth} \title{\Mfp{}: Pictures in \TeX{}\\ with Metafont and -MetaPost\thanks{Copywrite 2002--2006, Daniel H. Luecking}} +MetaPost\thanks{Copyright 2002--2010, Daniel H. Luecking}} \author{% Daniel H. Luecking% @@ -3472,14 +3472,10 @@ of the figure (as given by the arguments to the \env{mfpic} environment) is divided by 100. For example, in a 5-by-10 graph, giving a step size of $0$ will actually select \meta{step}${}= 10/100 = 0.1$. -The algorithm used will produce incorrect results if there are two -points on the curve closer that \meta{step} in straight-line distance, +The algorithm used will produce imprecise results if there are two +points on the curve closer than \meta{step} in straight-line distance, but much further apart when measured along the curve. -The algorithm used will produce incorrect results if two points of the -curve that are distant (as measured along the curve) are closer than -\meta{step} in straight-line distance. - \subsection{Plotting external data files}\label{external} \begin{cd}\pagelabel{datafile} @@ -6071,17 +6067,17 @@ further dicussion. \end{cd} With the \opt{metapost} option, when you write -\cs{opengraphsfile{figs}}, a file \file{figs.mp} is created. By default, -running \MP{} on it results in files named \file{figs.1}, \file{figs.2}, -etc. Recent \MP{} allows the output filenames to be modified. As of -\mfp{} version \mfpversion, you can do this to some extent from your -\file{.tex} file. One needs to define a template that tells \MP{} how to -construct the output file name from the `jobname' and the figure number. -This is done with the above command. In \meta{template} you can put any -plain characters, plus the two special tokens: \verb$\_$ and \verb$\#$. -Each figure's filename is constructed by replacing these tokens with the -\MP{} jobname and the figure number, respectively. For example, with the -jobname \file{figs}, +\cs{opengraphsfile}\marg{figs}, a file \file{figs.mp} is created. By +default, running \MP{} on it results in files named \file{figs.1}, +\file{figs.2}, etc. Recent \MP{} allows the output filenames to be +modified. As of \mfp{} version 1.00, you can do this to some extent from +your \file{.tex} file. One needs to define a template that tells \MP{} +how to construct the output file name from the `jobname' and the figure +number. This is done with the above command. In \meta{template} you can +put any plain characters, plus the two special tokens: \verb$\_$ and +\verb$\#$. Each figure's filename is constructed by replacing these +tokens with the \MP{} jobname and the figure number, respectively. For +example, with the jobname \file{figs}, \begin{verbatim} \setfilenametemplate{my\_-\#.mps} \end{verbatim} @@ -6139,7 +6135,7 @@ with the \cs{opengraphsfile} commands reading of these booleans. \end{cd} This expands to the current \mfp{} version multiplied by 100. At this -writing, it produces `\texttt{104}' because the version is 1.04. It can +writing, it produces `\texttt{105}' because the version is 1.05. It can be used to test the version: \begin{verbatim} \ifx\mfpicversion\undefined \def\mfpicversion{0}\fi @@ -6304,12 +6300,12 @@ all later environments. When \cs{plotdata} passes from one curve to the next, it increments a counter and uses that counter to select a dash pattern, color, or -symbol. It uses predefined dash \mfc{dashtype0} through \mfc{dashtype5}, -or predefined colors \mfc{colortype0} through \mfc{colortype7}, or -predefined symbols \mfc{pointtype0} through \mfc{pointtype8}. Here -follows a description of each of these variables. These variables must -not be used in the second argument of \cs{reconfigureplot}, whose -purpose is to redefine these variables. +symbol. It uses predefined dash patterns named \mfc{dashtype0} through +\mfc{dashtype5}, or predefined colors named \mfc{colortype0} through +\mfc{colortype7}, or predefined symbols named \mfc{pointtype0} through +\mfc{pointtype8}. Here follows a description of each of these variables. +These variables must not be used in the second argument of +\cs{reconfigureplot}, whose purpose is to redefine these variables. \medskip Under \cs{dashedlines}, we have the following dash patterns: @@ -6383,10 +6379,10 @@ fonts prepared for a LaserJet4 (600 DPI), this means 6.825 inches (17.3355cm). For a 1200 DPI pronter, the limit is 3.4125 inches. A similar limit holds for numbers input, and the values of variables: -\MF{} will return an error for \mfc{sin 4096}. Intermediate values can -be greater (\mfc{sin (2*2048)} will cause no error), but final, stored -results are subject to the limit. An \mfp{} example that generated an -error recently was: +\MF{} will return an error for ``\mfc{sin 4096}''. Intermediate values +can be greater (\mfc{sin (2*2048)} will cause no error), but final, +stored results are subject to the limit. An \mfp{} example that +generated an error recently was: \begin{verbatim} \mfpicunit 1mm \mfpic[10]{-3}{7}{-3.5}{5} diff --git a/Master/texmf-dist/metafont/mfpic/grafbase.mf b/Master/texmf-dist/metafont/mfpic/grafbase.mf index dcc1619c3e2..10f23e9688f 100644 --- a/Master/texmf-dist/metafont/mfpic/grafbase.mf +++ b/Master/texmf-dist/metafont/mfpic/grafbase.mf @@ -8,7 +8,7 @@ %% %% ------------------------------------------------------------------- %% -%% Copyright 2002--2009, Daniel H. Luecking +%% Copyright 2002--2010, Daniel H. Luecking %% %% Mfpic may be distributed and/or modified under the conditions of the %% LaTeX Project Public License, either version 1.3c of this license or (at @@ -22,7 +22,7 @@ %% with mfpic: plain TeX, LaTeX, plain Metafont and plain MetaPost. %% %%% File: grafbase.dtx -%%% A part of mfpic 1.04 2010/03/30 +%%% A part of mfpic 1.05 2010/06/10 %%% if (known grafbaseversion) or (known grafbase): message "Grafbase (" & jobname & "): You have loaded grafbase more " @@ -32,10 +32,10 @@ fi boolean grafbase; grafbase := true; string fileversion, filedate; -fileversion := "1.04"; filedate := "2010/03/30"; +fileversion := "1.05"; filedate := "2010/06/10"; -message " Loading grafbase macros version " & - fileversion & ", " & filedate & "."; +message " Loading grafbase macros, version " & fileversion & ", " & + filedate & "."; message " "; def GBmsg expr s = message "Grafbase (" & jobname & "): " & s; enddef; @@ -60,7 +60,7 @@ def checkversions (expr g)= fi enddef; -checkversions (104); +checkversions (105); if unknown base_name : input plain; elseif not string base_name: input plain; @@ -111,7 +111,6 @@ if unknown mode: fi fi mode_setup; - if debug: GBdebug; >> "pixels_per_inch = " & decimal pixels_per_inch; @@ -212,7 +211,7 @@ vardef makegray primary clr = enddef; def makergb = makegray enddef; def makecmyk = makegray enddef; -vardef iscolor expr clr = (color clr) enddef; +vardef iscolor expr clr = (color clr) enddef; vardef forceclr (expr c) = if unknown c : @@ -493,8 +492,7 @@ setcolor(grayscalewhite) gray(1); def setoutputtemplate text garbage = enddef; -def romannumeral = _romannumeral (true) enddef; -vardef _romannumeral (expr prefix, X) = +vardef GBromannumeral (expr X) = save Y, _tmp, U; string U; Y.m := X div 1000; % thousands digit @@ -505,30 +503,24 @@ vardef _romannumeral (expr prefix, X) = Y.i := _tmp - 10Y.x; % units strrepeat("m", Y.m) & - romandigit(prefix, "c", "d", "m", Y.c) & - romandigit(prefix, "x", "l", "c", Y.x) & - romandigit(prefix, "i", "v", "x", Y.i) + GBromandigit("c", "d", "m", Y.c) & + GBromandigit("x", "l", "c", Y.x) & + GBromandigit("i", "v", "x", Y.i) enddef; -vardef romandigit (expr prefix, bot, mid, top, n) = +vardef GBromandigit (expr bot, mid, top, n) = if n > 9 : top & strrepeat(bot, n-10) % shouldn't happen elseif n > 8 : - if prefix: bot & top % "ix" - else: mid & bot & bot & bot & bot % "viiii" - fi + bot & top % "ix" elseif n > 4 : mid & strrepeat (bot, n-5) % "v"--"viii" elseif n > 3 : - if prefix: bot & mid % "iv" - else: bot & bot & bot & bot % "iiii" - fi + bot & mid % "iv" else: strrepeat (bot, n) % ""--"iii" for 0--3 fi enddef; vardef strrepeat (expr st, rep) = - setstring (_sr) ""; - for i = 1 upto rep: _sr := _sr & st; endfor - _sr + "" for i = 1 upto rep: & st endfor enddef; transform ztr, vtr; diff --git a/Master/texmf-dist/metapost/mfpic/dvipsnam.mp b/Master/texmf-dist/metapost/mfpic/dvipsnam.mp index 2d0552256c1..2a3ae21c8a8 100644 --- a/Master/texmf-dist/metapost/mfpic/dvipsnam.mp +++ b/Master/texmf-dist/metapost/mfpic/dvipsnam.mp @@ -8,7 +8,7 @@ %% %% ------------------------------------------------------------------- %% -%% Copyright 2002--2009, Daniel H. Luecking +%% Copyright 2002--2010, Daniel H. Luecking %% %% Mfpic may be distributed and/or modified under the conditions of the %% LaTeX Project Public License, either version 1.3c of this license or (at @@ -22,7 +22,7 @@ %% with mfpic: plain TeX, LaTeX, plain Metafont and plain MetaPost. %% %%% File: grafbase.dtx -%%% A part of mfpic 1.04 2010/03/30 +%%% A part of mfpic 1.05 2010/06/10 %%% if unknown grafbaseversion: if unknown mpversion: diff --git a/Master/texmf-dist/metapost/mfpic/grafbase.mp b/Master/texmf-dist/metapost/mfpic/grafbase.mp index d67ae28f685..1b7cf501f82 100644 --- a/Master/texmf-dist/metapost/mfpic/grafbase.mp +++ b/Master/texmf-dist/metapost/mfpic/grafbase.mp @@ -8,7 +8,7 @@ %% %% ------------------------------------------------------------------- %% -%% Copyright 2002--2009, Daniel H. Luecking +%% Copyright 2002--2010, Daniel H. Luecking %% %% Mfpic may be distributed and/or modified under the conditions of the %% LaTeX Project Public License, either version 1.3c of this license or (at @@ -22,7 +22,7 @@ %% with mfpic: plain TeX, LaTeX, plain Metafont and plain MetaPost. %% %%% File: grafbase.dtx -%%% A part of mfpic 1.04 2010/03/30 +%%% A part of mfpic 1.05 2010/06/10 %%% if (known grafbaseversion) or (known grafbase): message "Grafbase (" & jobname & "): You have loaded grafbase more " @@ -32,10 +32,10 @@ fi boolean grafbase; grafbase := true; string fileversion, filedate; -fileversion := "1.04"; filedate := "2010/03/30"; +fileversion := "1.05"; filedate := "2010/06/10"; -message " Loading grafbase macros version " & - fileversion & ", " & filedate & "."; +message " Loading grafbase macros, version " & fileversion & ", " & + filedate & "."; message " "; def GBmsg expr s = message "Grafbase (" & jobname & "): " & s; enddef; @@ -60,7 +60,7 @@ def checkversions (expr g)= fi enddef; -checkversions (104); +checkversions (105); if unknown base_name : input plain; elseif not string base_name: input plain; @@ -245,7 +245,7 @@ else: (rgbtogray (redpart clr, greenpart clr, bluepart clr)) enddef; def makecmyk = makergb enddef; - vardef iscolor expr clr = (color clr) enddef; + vardef iscolor expr clr = (color clr) enddef; fi vardef knowncolor expr clr = (known clr) and (iscolor clr) enddef; @@ -549,8 +549,7 @@ else: def setoutputtemplate text garbage = enddef; fi -def romannumeral = _romannumeral (true) enddef; -vardef _romannumeral (expr prefix, X) = +vardef GBromannumeral (expr X) = save Y, _tmp, U; string U; Y.m := X div 1000; % thousands digit @@ -561,30 +560,24 @@ vardef _romannumeral (expr prefix, X) = Y.i := _tmp - 10Y.x; % units strrepeat("m", Y.m) & - romandigit(prefix, "c", "d", "m", Y.c) & - romandigit(prefix, "x", "l", "c", Y.x) & - romandigit(prefix, "i", "v", "x", Y.i) + GBromandigit("c", "d", "m", Y.c) & + GBromandigit("x", "l", "c", Y.x) & + GBromandigit("i", "v", "x", Y.i) enddef; -vardef romandigit (expr prefix, bot, mid, top, n) = +vardef GBromandigit (expr bot, mid, top, n) = if n > 9 : top & strrepeat(bot, n-10) % shouldn't happen elseif n > 8 : - if prefix: bot & top % "ix" - else: mid & bot & bot & bot & bot % "viiii" - fi + bot & top % "ix" elseif n > 4 : mid & strrepeat (bot, n-5) % "v"--"viii" elseif n > 3 : - if prefix: bot & mid % "iv" - else: bot & bot & bot & bot % "iiii" - fi + bot & mid % "iv" else: strrepeat (bot, n) % ""--"iii" for 0--3 fi enddef; vardef strrepeat (expr st, rep) = - setstring (_sr) ""; - for i = 1 upto rep: _sr := _sr & st; endfor - _sr + "" for i = 1 upto rep: & st endfor enddef; transform ztr, vtr; @@ -3487,7 +3480,7 @@ def setdatacolors (text lst) = string colortype[], _tmpstr; for _itm = _datacolors: % % Each string is the name of some color variable - _tmpstr := "colortype_"&romannumeral(colortype); + _tmpstr := "colortype_" & GBromannumeral(colortype); setcolor (scantokens(_tmpstr)) _itm; colortype[colortype] := _tmpstr; next colortype; diff --git a/Master/texmf-dist/source/generic/mfpic/grafbase.dtx b/Master/texmf-dist/source/generic/mfpic/grafbase.dtx index 013d7adf8d3..32d14a5b676 100644 --- a/Master/texmf-dist/source/generic/mfpic/grafbase.dtx +++ b/Master/texmf-dist/source/generic/mfpic/grafbase.dtx @@ -1,10 +1,10 @@ % \iffalse %%% File: grafbase.dtx -%%% A part of mfpic 1.04 2010/03/30 +%%% A part of mfpic 1.05 2010/06/10 %%% % ------------------------------------------------------------------- % -% Copyright 2002--2006, Daniel H. Luecking +% Copyright 2002--2010, Daniel H. Luecking % % Mfpic may be distributed and/or modified under the conditions of the % LaTeX Project Public License, either version 1.3b of this license or (at @@ -19,7 +19,7 @@ % %<*driver> \ProvidesFile{grafbase.dtx} - [2010/03/30 v1.04. Metafont/post macros to interface with mfpic.]% + [2010/06/10 v1.05. Metafont/post macros to interface with mfpic.]% \documentclass{ltxdoc} \usepackage{docmfp} @@ -113,7 +113,7 @@ % %\fi % -% \CheckSum{1465} +% \CheckSum{1453} % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z % Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z @@ -171,10 +171,12 @@ % % \DescribeRoutine{GBmsg} % These are used fairly consistently and identify the source of the -% message delivered as being `\gbc{Grafbase}'. \DescribeRoutine{GBwarn} -% Warnings are delivered by \gbc{GBwarn}. The takes care of both the -% \DescribeRoutine{GBerrmsg}\gbc{GBerrmsg}error message and the -% \mfc{errhelp} string. +% message delivered as being `\gbc{Grafbase}'. +% \DescribeRoutine{GBwarn} +% Warnings are delivered by \gbc{GBwarn}. The macro \gbc{GBerrmsg} takes +% care of both the +% \DescribeRoutine{GBerrmsg} +% error message and the \mfc{errhelp} string. % \begin{macrocode} %<*MF|MP> if (known grafbaseversion) or (known grafbase): @@ -185,10 +187,10 @@ fi boolean grafbase; grafbase := true; string fileversion, filedate; -fileversion := "1.04"; filedate := "2010/03/30"; +fileversion := "1.05"; filedate := "2010/06/10"; -message " Loading grafbase macros version " & - fileversion & ", " & filedate & "."; +message " Loading grafbase macros, version " & fileversion & ", " & + filedate & "."; message " "; def GBmsg expr s = message "Grafbase (" & jobname & "): " & s; enddef; @@ -209,7 +211,8 @@ enddef; % The output file written by the \mfpic{} macros includes a test that % \gbc{mfpicversion} and \mfc{grafbaseversion} are the same, % but that would fail to catch a new \grafbase{} with an old \mfpic. So -% we also put a test here with \DescribeRoutine{checkversions} +% we also put a test here with +% \DescribeRoutine{checkversions} % \gbc{checkversions}, though it alone would fail to catch the use % of older versions of \grafbase{} with current versions of \mfpic. Newer % versions of \mfpic{} signal their version before inputting @@ -233,7 +236,7 @@ def checkversions (expr g)= fi enddef; -checkversions (104); +checkversions (105); % \end{macrocode} % @@ -247,6 +250,7 @@ elseif base_name <> "plain": input plain; fi % \end{macrocode} +% % \DescribeRoutine{GBdebug} % The \gbc{debug} flag is for developers, who should set it before % inputing \file{grafbase}. @@ -347,7 +351,6 @@ fi % % \end{macrocode} % -% % \subsection{Setting up the font, \MF{} only}\label{font} % % Font-related housekeeping is only for \MF{}. \MF{} only produces @@ -386,7 +389,6 @@ if unknown mode: fi fi mode_setup; - if debug: GBdebug; >> "pixels_per_inch = " & decimal pixels_per_inch; @@ -421,7 +423,7 @@ fi % % Don't complain when variables get too large. For \MF{} this \emph{must} % be after \mfc{mode_setup}. Also don't complain if a clockwise path is -% filled (only \MF{} does this). +% filled (only \MF{} worries about this). % \begin{macrocode} interim warningcheck := 0; %interim turningcheck := 0; @@ -453,19 +455,20 @@ yneg := 0; ypos := 10; % \end{macrocode} % -% \DescribeVariable{deg}\VariableIndex{degree} +% \DescribeVariable{deg} +% \VariableIndex{degree} % We support both degrees and radians for angles. In \MF, one degree is % the unit of angle. % \DescribeVariable{radian} % One radian is $180/\pi$ degrees. We also define \gbc{pi} so a user can say % \gbc{90} or \gbc{90deg} or \gbc{pi/2*radian} -% \DescribeVariable{pi} for the same effect. -% Actually, not quite: because of \MF{}'s precision limits, the latter is -% about 90.00025 degrees. \MF{}'s precision is 16 binary places, or -% slightly under 5 decimals. The accuracy of \gbc{pi} and \gbc{radian} is -% the maximum possible. If we \emph{define} \gbc{radian} to be -% \gbc{90/(pi/2)} or \gbc{180/pi} the value of \gbc{pi/2*radian} is even -% less accurate. +% \DescribeVariable{pi} +% for the same effect. Actually, not quite: because of \MF{}'s precision +% limits, the latter is about 90.00025 degrees. \MF{}'s precision is 16 +% binary places, or slightly under 5 decimals. The accuracy of \gbc{pi} +% and \gbc{radian} is the maximum possible. If we \emph{define} +% \gbc{radian} to be \gbc{90/(pi/2)} or \gbc{180/pi} the value of +% \gbc{pi/2*radian} is even less accurate. % \begin{macrocode} newinternal deg, pi, radian; deg := 1; pi := 3.14159; @@ -618,10 +621,11 @@ background := white; % \end{macrocode} % % \DescribeRoutine{snapto} -% This truncates numerics to the $[0,1]$ range, but also returns a value -% ($0$) for unknown input. It used to do the same for non-numeric input, -% but that should be an error. It would have made at least one of our -% bugs easier to find if it had produced an error message. +% The \gbc{snapto} macro truncates numerics to the $[0,1]$ range, but also +% returns a value ($0$) for unknown input. It used to do the same for +% nonnumeric input, but that should be an error. It would have made at +% least one of our bugs easier to find if it had produced an error message +% back then. % \begin{macrocode} vardef snapto expr t = if numeric t: @@ -667,7 +671,7 @@ vardef cmykgray (expr g) = cmyk(0,0,0,1 - snapto g) enddef; % cases and write the code for each, rather than load all the functions % with three-way booleans (often containing nested booleans). % -% For all three engines we require a deginition of the color functions +% For all three engines we require a definition of the color functions % \gbc{gray(g)}, \gbc{rgb(r,g,b)}, and \gbc{cmyk(c,m,y,k)}, conversion % functions \gbc{makegray(x)}, \gbc{makergb(x)}, amd \gbc{makecmyk(x)}, % and the boolean \gbc{iscolor clr}. The first three have to return @@ -705,7 +709,9 @@ if has_cmyk : % \end{macrocode} % -% \DescribeRoutine{makecmyk}\DescribeRoutine{makergb}\DescribeRoutine{makegray} +% \DescribeRoutine{makecmyk} +% \DescribeRoutine{makergb} +% \DescribeRoutine{makegray} % In \gbc{makecmyk} and all the other `\gbc{make}' conversions, the % default is to return black in the appropriate model, numerics produce % gray, and cmyk or rgb is either retained unchanged or converted to the @@ -741,6 +747,7 @@ else: % In early \MP{} \gbc{colorchoice} is a three-way choice, since % \mfc{cmykcolor} is not an available data type, but numeric can still be % interpreted as a gray. +% % \DescribeRoutine{makecmyk} % \DescribeRoutine{makergb} % \DescribeRoutine{makegray} @@ -769,7 +776,7 @@ else: (rgbtogray (redpart clr, greenpart clr, bluepart clr)) enddef; def makecmyk = makergb enddef; - vardef iscolor expr clr = (color clr) enddef; + vardef iscolor expr clr = (color clr) enddef; fi % @@ -795,7 +802,7 @@ vardef makegray primary clr = enddef; def makergb = makegray enddef; def makecmyk = makegray enddef; -vardef iscolor expr clr = (color clr) enddef; +vardef iscolor expr clr = (color clr) enddef; % % \end{macrocode} @@ -965,12 +972,12 @@ enddef; % % Since the above change was made, macros evolved so that \emph{all} uses % of \gbc{textpairs} are now preceeded by \gbc{save}. Thus, I have now -% replaced them all with calls to \gbc{setpairs} (it calls \gbc{setarray} -% \emph{does} \gbc{save} the variable). In all those cases, the +% replaced them all with calls to \gbc{setpairs} (it calls \gbc{setarray}, +% which \emph{does} \gbc{save} the variable). In all those cases, the % `\gbc{saved}' variable is a temporary local array. % % \DescribeRoutine{setuniquepairs} -% This does the same but omit any pair if it is identical to the previous +% This does the same but omits any pair if it is identical to the previous % one. It \mfc{save}\,s the variable, since all its uses are internal % and require that. % \begin{macrocode} @@ -998,12 +1005,12 @@ enddef; % each part of pair \gbc{p}, and returns the resultant pair. I've decided % not to use it (for efficiency), but to leave it defined for backward % compatibility.\\ -% \DescribeRoutine{floorpair}\gbc{floorpair} applies \mfc{floor} to both -% parts of a pair.\\ -% \DescribeRoutine{ceilingpair}\gbc{ceilingpair} does the same with -% \gbc{ceiling}.\\ -% \DescribeRoutine{hroundpair}\gbc{hroundpair} does the same with -% \gbc{hround}. +% \DescribeRoutine{floorpair} +% \gbc{floorpair} applies \mfc{floor} to both parts of a pair.\\ +% \DescribeRoutine{ceilingpair} +% \gbc{ceilingpair} does the same with \gbc{ceiling}.\\ +% \DescribeRoutine{hroundpair} +% \gbc{hroundpair} does the same with \gbc{hround}. % % All three could use \gbc{chpair} with \gbc{proc} equal to \mfc{floor}, % \mfc{ceiling} and \mfc{hround}, but I now code them directly. @@ -1030,16 +1037,19 @@ vardef goodpair (expr p) = hroundpair(p.t_) enddef; % \end{macrocode} % % \DescribeRoutine{emin} -% \gbc{emin} differs from \prog{plain}'s \mfc{min} in that it allows -% only two values. It can therefore be coded simply, without the overhead -% of a \mfc{for}-loop. \DescribeRoutine{emax}\gbc{emax} is analogous. Both -% are needed so often that it is possible a significant amount of time is -% saved with these versions. +% The macro \gbc{emin} differs from \prog{plain}'s \mfc{min} in that it +% allows only two values. It can therefore be coded simply, without the +% overhead of a \mfc{for}-loop. +% \DescribeRoutine{emax} +% \gbc{emax} is analogous. Both are needed so often that it is possible a +% significant amount of time is saved with these versions. % % \DescribeRoutine{pairmin} -% \gbc{pairmin} operates on two pairs, returning a pair having the -% smaller of the two xparts and the smaller of the two yparts. Of course -% \DescribeRoutine{pairmax}\gbc{pairmax} is analogous, producing the maximum. +% The macro \gbc{pairmin} operates on two pairs, returning a pair having +% the smaller of the two xparts and the smaller of the two yparts. Of +% course +% \DescribeRoutine{pairmax} +% \gbc{pairmax} is analogous, producing the maximum. % % \DescribeRoutine{minpair} % The \gbc{minpair} macro returns the pair comprising the minimum $x$ and @@ -1084,21 +1094,25 @@ primarydef Z xprod W = (xpart Z * ypart W - xpart W * ypart Z) enddef; % \end{macrocode} % % \DescribeRoutine{force_initial} -% \gbc{force_initial} modifies a path so that it has all the same points -% and controls as before, except its first point is replaced with \mfc{p}. -% \DescribeRoutine{force_terminal}\gbc{force_terminal} replaces the last -% point. This is for cases where, theoretically, paths \gbc{f} and \gbc{g} -% should meet at an endpoint, but do not due to finite precision. Instead -% of doing \mfc{f..g}, which adds a random tiny segment, we adjust the -% endpoints to exactly match the other and do \mfc{f\&g}, producing a join -% without an additional segment. +% The command \gbc{force_initial} modifies a path so that it has all the +% same points and controls as before, except its first point is replaced +% with \mfc{p}. +% \DescribeRoutine{force_terminal} +% The command \gbc{force_terminal} replaces the last point. This is for +% cases where, theoretically, paths \gbc{f} and \gbc{g} should meet at an +% endpoint, but do not due to finite precision. Instead of doing +% \mfc{f..g}, which adds a random tiny segment, we adjust the endpoints to +% exactly match the other and do \mfc{f\&g}, producing a join without an +% additional segment. % % \DescribeRoutine{force_equal_ends} -% This forces the last point of the first path and the first point of the -% second to equal the average of their original values. It is the only one -% of these four actually used anywhere else in \grafbase. -% \DescribeRoutine{replace_ends_of_cycle}\gbc{replace_ends_of_cycle} -% applies something similar to a cycle. +% The command \gbc{force_equal_ends} forces the last point of the first +% path and the first point of the second to equal the average of their +% original values. It is the only one of these four actually used anywhere +% else in \grafbase. +% \DescribeRoutine{replace_ends_of_cycle} +% The command \gbc{replace_ends_of_cycle} applies something similar to a +% cycle. % \begin{macrocode} def force_initial (expr p) (suffix f) = hide( setnumeric (_n) length f; @@ -1142,11 +1156,13 @@ enddef; % \DescribeRoutine{intersects} % A binary relation, with the precedence level (almost) that of other % relations, produces \mfc{true} if \MF{} determines that the paths -% intersect, false otherwise. It also \DescribeVariable{thetimes}sets the -% pair variable \gbc{thetimes} and its parts \gbc{_Xtime} and \gbc{_Ytime}. -% Then \DescribeRoutine{misses}\gbc{misses} is the opposite relation, -% used when the intersection point is not needed. It only occurs in the -% (unused) code of \gbc{tightbbox}. +% intersect, false otherwise. It also +% \DescribeVariable{thetimes} +% sets the pair variable \gbc{thetimes} and its parts \gbc{_Xtime} and +% \gbc{_Ytime}. Then +% \DescribeRoutine{misses} +% \gbc{misses} is the opposite relation, used when the intersection point +% is not needed. It only occurs in the (unused) code of \gbc{tightbbox}. % \begin{macrocode} pair thetimes; numeric _Xtime, _Ytime; @@ -1164,19 +1180,23 @@ tertiarydef a misses b = ((a intersectiontimes b) < origin) enddef; % \end{macrocode} % % \DescribeRoutine{makepicture} -% Takes any expression and does what it can to make a picture from it. +% The \gbc{makepicture} command takes any expression and does what it can +% to make a picture from it. % % \DescribeRoutine{onepointpath} -% Takes a point and forces it to be a path. If a vardef takes a list of -% points and it \emph{must} return a path that perhaps \emph{must} be -% cyclic, it can use this as a fallback. If an \mfpic{} command such as -% \cs{arc} receives an invalid optional parameter, it won't know what -% command to write to the output file. It can use -% \DescribeRoutine{fallbackpath}\gbc{fallbackpath} as long as the first -% parameter is a point. +% The \gbc{onepointpath} command takes a point and forces it to be a path. +% If a vardef takes a list of points and it \emph{must} return a path that +% perhaps \emph{must} be cyclic, it can use this as a fallback. If an +% \mfpic{} command such as \cs{arc} receives an invalid optional +% parameter, it won't know what command to write to the output file. It +% can use +% \DescribeRoutine{fallbackpath} +% \gbc{fallbackpath} as long as the first parameter is a point. % % \DescribeRoutine{even} -% Of course \gbc{even} means \gbc{not odd}. +% \DescribeRoutine{divides} +% Of course \gbc{even} means \gbc{not odd}. The relation \gbc{divides} +% is true if the right side is an integer multiple of the left. % \begin{macrocode} vardef makepicture (expr s) = if picture s: s @@ -1212,7 +1232,9 @@ enddef; % \DescribeRoutine{beginimage} % Instead of making lengthy drawing code a parameter, one might prefer an % environment-like syntax, writing \gbc{X := beginimage } at the start -% and \DescribeRoutine{endimage}\gbc{endimage} at the end. +% and +% \DescribeRoutine{endimage} +% \gbc{endimage} at the end. % % \DescribeRoutine{makeimage} % This is for the \mfpic{} command \cs{mfpimage}. It takes a suffix @@ -1270,9 +1292,10 @@ enddef; % \RoutineIndex{settransform}\gbc{settransform}, even though they are not % used anywhere in \grafbase{}. % -% \DescribeRoutine{gsetvariable}\gbc{gsetvariable} is the global version. -% It has no abbreviations, but it is occasionally needed for \mfpic{}. The -% only difference between it and the local version is the lack of a +% \DescribeRoutine{gsetvariable} +% The macro \gbc{gsetvariable} is the global version. It has no +% abbreviations, but it is occasionally needed for \mfpic{}. The only +% difference between it and the local version is the lack of a % \gbc{save}. None of these commands take the value as a parameter. That % should follow, and is picked up by the ending \mfc{:=}. % @@ -1281,8 +1304,10 @@ enddef; % as \gbc{setvariable}, but what should follow is a list of expressions in % parentheses. It calls \gbc{list} to read each item into % \gbc{name1}, \gbc{name2}, etc. There is also has a global version -% \DescribeRoutine{gsetarray}\gbc{gsetarray}. -% \DescribeRoutine{setpairs}\gbc{setpairs} is an abbreviation for arrays +% \DescribeRoutine{gsetarray} +% \gbc{gsetarray}. +% \DescribeRoutine{setpairs} +% \gbc{setpairs} is an abbreviation for arrays % of pairs. Historically, it came first. % \begin{macrocode} def setvariable (text kind) (suffix name) = @@ -1403,8 +1428,26 @@ fi % %def setoutputtemplate text garbage = enddef; -def romannumeral = _romannumeral (true) enddef; -vardef _romannumeral (expr prefix, X) = +% \end{macrocode} +% +% \DescribeRoutine{GBromannumeral} +% We will append roman numerals to the ends of a variable name to +% emulate an array. This will be needed when our `array' consists of +% colors with different types. \MP{} doesn't permit true arrays to +% contain different types. We use `\gbc{GB}' in the name because a +% package exists that defines \mfc{romannumeral} differently +% +% \DescribeRoutine{GBromandigit} +% Roman numerals can conveniently be computed one digit at a time. The +% algorithm is the same for each digit, differing only in the letters +% used. Thus we define \gbc{GBromandigit} and call it three times with +% different sets of letters. +% +% \DescribeRoutine{strrepeat} +% The helper macro \gbc{strrepeat} creates a new string by concatenating +% \mfc{rep} copies of the string \mfc{str}. +% \begin{macrocode} +vardef GBromannumeral (expr X) = save Y, _tmp, U; string U; Y.m := X div 1000; % thousands digit @@ -1415,30 +1458,24 @@ vardef _romannumeral (expr prefix, X) = Y.i := _tmp - 10Y.x; % units strrepeat("m", Y.m) & - romandigit(prefix, "c", "d", "m", Y.c) & - romandigit(prefix, "x", "l", "c", Y.x) & - romandigit(prefix, "i", "v", "x", Y.i) + GBromandigit("c", "d", "m", Y.c) & + GBromandigit("x", "l", "c", Y.x) & + GBromandigit("i", "v", "x", Y.i) enddef; -vardef romandigit (expr prefix, bot, mid, top, n) = +vardef GBromandigit (expr bot, mid, top, n) = if n > 9 : top & strrepeat(bot, n-10) % shouldn't happen elseif n > 8 : - if prefix: bot & top % "ix" - else: mid & bot & bot & bot & bot % "viiii" - fi + bot & top % "ix" elseif n > 4 : mid & strrepeat (bot, n-5) % "v"--"viii" elseif n > 3 : - if prefix: bot & mid % "iv" - else: bot & bot & bot & bot % "iiii" - fi + bot & mid % "iv" else: strrepeat (bot, n) % ""--"iii" for 0--3 fi enddef; vardef strrepeat (expr st, rep) = - setstring (_sr) ""; - for i = 1 upto rep: _sr := _sr & st; endfor - _sr + "" for i = 1 upto rep: & st endfor enddef; % \end{macrocode} @@ -1493,9 +1530,10 @@ enddef; % \DescribeVariable{vtr} % We therefore have two transforms: \gbc{vtr} is the \emph{vector} or % linear transform for pair quantities that remain invariant under shifts, -% and \DescribeVariable{ztr}\gbc{ztr} is a \emph{point} or affine -% transformation for pair quantities that change appropriately under -% shifts. +% and +% \DescribeVariable{ztr} +% \gbc{ztr} is a \emph{point} or affine transformation for pair quantities +% that change appropriately under shifts. % % The quantities \gbc{xneg}, \gbc{xpos}, \gbc{yneg}, and \gbc{ypos} are % in \emph{graph} coordinates. Shifting by \gbc{(-xneg, -yneg)} transforms @@ -1565,14 +1603,15 @@ enddef; % The macro \gbc{zconv} converts a variety of expressions from graph to % device coordinates. The expressions include pairs, paths, and transforms. % This is an affine transform. The inverse, -% \DescribeRoutine{invzconv}\gbc{invzconv}, converts a variety of -% expressions from device to graph coordinates. +% \DescribeRoutine{invzconv} +% \gbc{invzconv}, converts a variety of expressions from device to graph +% coordinates. % % \DescribeRoutine{vconv} % The vector version, \gbc{vconv}, converts a vector \gbc{v} from graph to % device coordinates. This is a linear (ie, vector) transform. Also, -% \DescribeRoutine{invvconv}\gbc{invvconv} converts a vector from device -% to graph coordinates. +% \DescribeRoutine{invvconv} +% \gbc{invvconv} converts a vector from device to graph coordinates. % \begin{macrocode} vardef zconv (expr a) = a transformed ztr enddef; vardef invzconv (expr a) = a transformed (inverse ztr) enddef; @@ -1882,14 +1921,15 @@ label_sep := 0; labelpath_sep := 0; % placement when \gbc{newgblabel} replace \gbc{gblabel}.) Then % \gbc{readjustdims} extends that box by \gbc{label_sep}, a new % reference point for the picture is calculated using -% \DescribeRoutine{ref_shift}\gbc{ref_shift}, and then \gbc{thegblabel} -% rotates it around the reference point and adds the \gbc{label_adjust}. -% Finally, for each \gbc{_itm} in \gbc{pts}, the result is shifted by -% \gbc{_itm}. If \gbc{overlaylabels} is true, the label is placed on the -% picture \gbc{foreground_labels} and added to \gbc{active_plane} at -% \gbc{endmfpic}. If \gbc{underlaylabels} is true, it is placed in -% picture \gbc{background_labels} and \gbc{active_plane} is placed on top -% of it. Otherwise, it is added directly to \gbc{active_plane} and the +% \DescribeRoutine{ref_shift} +% \gbc{ref_shift}, and then \gbc{thegblabel} rotates it around the +% reference point and adds the \gbc{label_adjust}. Finally, for each +% \gbc{_itm} in \gbc{pts}, the result is shifted by \gbc{_itm}. If +% \gbc{overlaylabels} is true, the label is placed on the picture +% \gbc{foreground_labels} and added to \gbc{active_plane} at +% \gbc{endmfpic}. If \gbc{underlaylabels} is true, it is placed in picture +% \gbc{background_labels} and \gbc{active_plane} is placed on top of it. +% Otherwise, it is added directly to \gbc{active_plane} and the % \gbc{labelbb} variables are adjusted. % % We also use \gbc{ref_shift} in \MF{} since the curves that surround text @@ -1960,20 +2000,20 @@ enddef; % The three macros \gbc{textrect}, \gbc{textoval} and \gbc{textellipse} % are designed to surround a bit of text with some curve. These macros % return the path in graph coordinates. In -% \DescribeRoutine{textrect}\gbc{textrect}, the path is a rectangle with -% optionally rounded corners. The second parameter, \gbc{rad}, is the -% radius of quarter circles at the corners (in device units). In the other -% two cases, the path is an ellipse. They differ in the meaning of the -% second parameter. -% -% In \DescribeRoutine{textoval}\gbc{textoval}, the second parameter -% \emph{multiplies} the ratio of width to height of the text to produce -% the ratio for the ellipse. Thus, with \gbc{mult}=1, the ratio will be -% the same as that of the text. In -% \DescribeRoutine{textellipse}\gbc{textellipse}, the second parameter -% \gbc{rat} is the actual value of the ratio of width to height of the -% ellipse and a value of 1 produces a circle. In either macro, if that -% parameter is 0, we draw a rectangle. +% \DescribeRoutine{textrect} +% \gbc{textrect}, the path is a rectangle with optionally rounded corners. +% The second parameter, \gbc{rad}, is the radius of quarter circles at the +% corners (in device units). In the other two cases, the path is an +% ellipse. They differ in the meaning of the second parameter. +% +% \DescribeRoutine{textoval} +% In \gbc{textoval}, the second parameter \emph{multiplies} the ratio of +% width to height of the text to produce the ratio for the ellipse. Thus, +% with \gbc{mult}=1, the ratio will be the same as that of the text. In +% \DescribeRoutine{textellipse} +% \gbc{textellipse}, the second parameter \gbc{rat} is the actual value of +% the ratio of width to height of the ellipse and a value of 1 produces a +% circle. In either macro, if that parameter is 0, we draw a rectangle. % % The size of each path is determined so that, when the text is placed and % the path drawn, it passes through the four corners of the following @@ -2009,11 +2049,12 @@ enddef; % \end{macrocode} % -% \DescribeRoutine{textrectx}\gbc{textrectx} is the extended version of -% \gbc{textrect} which allows the same adjustments to the rectangle that we -% can apply to the text it surrounds (via \gbc{newgblabel}). In fact, it -% calculates the position in exactly the same manner as that macro, and -% the first 4 parameters encode that position in the same way. +% \DescribeRoutine{textrectx} +% Macro \gbc{textrectx} is the extended version of \gbc{textrect} which +% allows the same adjustments to the rectangle that we can apply to the +% text it surrounds (via \gbc{newgblabel}). In fact, it calculates the +% position in exactly the same manner as that macro, and the first 4 +% parameters encode that position in the same way. % % The placement of each path is: shifted and rotated by the same amount % as the text (by \gbc{ref_shift}) according to the first four parameters, @@ -2027,14 +2068,15 @@ enddef; % parameters \gbc{lbl}, \gbc{mult}, \gbc{rad}, and \gbc{loc} are as in % the unextended versions. % -% \DescribeVariable{roundends}\gbc{roundends} is a boolean. We really only -% need it to be a type distinguishable from any numeric value. \Mfpic{} -% users can specify it rather than an explicit radius, and when the code -% of \gbc{textrectx} detects this, it uses the maximum radius for the -% corners (making the short side of the `rectangle' a semicircle). That -% is, if \gbc{rad} is a boolean (and \mfc{true}) then the radius at the -% corners is so chosen. If \gbc{rad} is \mfc{false} the corners are not -% rounded at all. +% \DescribeVariable{roundends} +% The variable \gbc{roundends} is a boolean. We really only need it to be +% a type distinguishable from any numeric value. \Mfpic{} users can +% specify it rather than an explicit radius, and when the code of +% \gbc{textrectx} detects this, it uses the maximum radius for the corners +% (making the short side of the `rectangle' a semicircle). That is, if +% \gbc{rad} is a boolean (and \mfc{true}) then the radius at the corners +% is so chosen. If \gbc{rad} is \mfc{false} the corners are not rounded at +% all. % \begin{macrocode} boolean roundends; roundends := true; vardef textrectx (expr a, b, c, rot, xy, lbl, rad, loc) = @@ -2073,10 +2115,12 @@ enddef; % \end{macrocode} % -% \DescribeRoutine{textellipsex}The macro \gbc{textellipsex} is a simlar -% extension for \gbc{textellipse}. It and the related macro -% \DescribeRoutine{textovalx}\gbc{textovalx} now call a common macro with -% different values of a boolean parameter. +% \DescribeRoutine{textellipsex} +% The macro \gbc{textellipsex} is a simlar extension for +% \gbc{textellipse}. It and the related macro +% \DescribeRoutine{textovalx} +% \gbc{textovalx} now call a common macro with different values of a +% boolean parameter. % \begin{macrocode} def textovalx = xellipse (true) enddef; def textellipsex = xellipse (false) enddef; @@ -2175,8 +2219,8 @@ enddef; % We set \gbc{secd x = 1/(cosd x)} unless \gbc{cosd x} is less than % \gbc{reallysmall}, then we set it equal to \gbc{1/reallysmall}. We do a % similar thing with \gbc{cscd}. (When such a substitution happens -% \DescribeRoutine{TruncateWarn}\gbc{TruncateWarn} prints a message -% that a truncation has taken place.) +% \DescribeRoutine{TruncateWarn} +% \gbc{TruncateWarn} prints a message that a truncation has taken place.) % % Why not just determine what number will produce arithmetic overflow and % test for that? Because I'm lazy: it would require a different number @@ -2269,9 +2313,11 @@ vardef csc primary X = cscd (X*radian) enddef; % \end{macrocode} % -% It is useful to have a \DescribeRoutine{degrees}command to convert -% from radians to degrees and one to \DescribeRoutine{radians}convert -% from degrees to radians. Thus \gbc{degrees(pi)} produces +% \DescribeRoutine{degrees} +% It is useful to have a command to convert from radians to degrees and +% one to +% \DescribeRoutine{radians} +% convert from degrees to radians. For example, \gbc{degrees(pi)} produces % (approximately) $180$ and \gbc{radians(180)} is approximately $\pi$. % \begin{macrocode} vardef degrees (expr t) = t*radian enddef; @@ -2461,11 +2507,13 @@ let ^ = **; % \DescribeRoutine{T_pop} % \gbc{T_pop} pops it off into its argument (a transform variable name). % We also define two localizing macros -% \DescribeRoutine{bcoords}\gbc{bcoords} that pushes our \gbc{ztr} -% on the stack, and \DescribeRoutine{ecoords}\gbc{ecoords} that pops it -% off. We no longer put \gbc{vtr} on the stack, since we can recalculate -% it whenever \gbc{ztr} is changed. \gbc{apply_t} always did this, now -% \gbc{ecoords} does so as well. +% \DescribeRoutine{bcoords} +% \gbc{bcoords} that pushes our \gbc{ztr} +% on the stack, and +% \DescribeRoutine{ecoords} +% \gbc{ecoords} that pops it off. We no longer put \gbc{vtr} on the stack, +% since we can recalculate it whenever \gbc{ztr} is changed. \gbc{apply_t} +% always did this, now \gbc{ecoords} does so as well. % \begin{macrocode} transform T_stack[]; numeric T_stack; T_stack := 0; @@ -2575,30 +2623,33 @@ def boost primary X = zslant (cosh X, sinh X) enddef; % \DescribeRoutine{xscaledpath} % \gbc{xscaledpath} is similar, but only the horizontal distances from % the line $x={}$\gbc{a} are multiplied by \gbc{s}. And with -% \DescribeRoutine{yscaledpath}\gbc{yscaledpath} the vertical distances -% from the line $y={}$\gbc{b} are multiplied by \gbc{s}. +% \DescribeRoutine{yscaledpath} +% \gbc{yscaledpath} the vertical distances from the line $y={}$\gbc{b} are +% multiplied by \gbc{s}. % % \DescribeRoutine{xslantedpath} -% This returns the path xslanted with line $y = {}$\gbc{b} -% being the pivot rather than the $x$-axis. \DescribeRoutine{slantedpath} +% The macro \gbc{xslantedpath} returns the path xslanted with line +% $y = {}$\gbc{b} being the pivot rather than the $x$-axis. +% \DescribeRoutine{slantedpath} % The command \gbc{slantedpath} is just an alias for \gbc{xslantedpath}, -% while \DescribeRoutine{yslantedpath}\gbc{yslantedpath} is the vertical -% version, yslanted with line $x = {}$\gbc{a} being the pivot rather than -% the $y$-axis. +% while +% \DescribeRoutine{yslantedpath} +% \gbc{yslantedpath} is the vertical version, yslanted with line $x = +% {}$\gbc{a} being the pivot rather than the $y$-axis. % % \DescribeRoutine{shiftedpath} % This returns the path shifted by the vector (pair) \gbc{v}. % % \DescribeRoutine{xyswappedpath} -% This returns the path in which all points have had the coordinates -% exchanged $(a, b) \to (b, a)$. Note that this is not the same as -% \gbc{reflectedpath ((0,0), (1,1))}, as it performs the reflection in -% graph coordinates, as its name implies. If \gbc{vtr} has not been -% changed (by \gbc{apply_t}) then \gbc{xyswappedpath} will convert -% vertical lines to horizontal and vice versa. The \gbc{reflectedpath} -% version will not when $x$ and $y$ are scaled differently, for then the -% line \gbc{(0,0)--(1,1)} is not at a 45 degree angle in device -% coordinates where drawing takes place. +% The command \gbc{xyswappedpath} returns the path in which all points +% have had the coordinates exchanged $(a, b) \to (b, a)$. Note that this +% is not the same as \gbc{reflectedpath ((0,0), (1,1))}, as it performs +% the reflection in graph coordinates, as its name implies. If \gbc{vtr} +% has not been changed (by \gbc{apply_t}) then \gbc{xyswappedpath} will +% convert vertical lines to horizontal and vice versa. The +% \gbc{reflectedpath} version will not when $x$ and $y$ are scaled +% differently, for then the line \gbc{(0,0)--(1,1)} is not at a 45 degree +% angle in device coordinates where drawing takes place. % % \begin{macrocode} vardef transformedpath (text Transformer) expr f = f Transformer @@ -2718,10 +2769,10 @@ enddef; % \DescribeRoutine{pathtime} % \gbc{pathtime} returns the time \mfc{t} such that \mfc{point t of p} is % \gbc{frac} of the distance along \gbc{p} from the start, and -% \DescribeRoutine{pathpoint}\gbc{pathpoint} returns the point itself. -% Because the \gbc{gettime} routine requires it anyway, we truncate -% \gbc{frac} to the interval $[0,1]$ and avoid calling that rather -% lengthy function at $0$ and $1$. +% \DescribeRoutine{pathpoint} +% \gbc{pathpoint} returns the point itself. Because the \gbc{gettime} +% routine requires it anyway, we truncate \gbc{frac} to the interval +% $[0,1]$ and avoid calling that rather lengthy function at $0$ and $1$. % % The path in pathtime should be in device coordinates, whereas the % user-level command \gbc{pathpoint} expects it in graph coordinates. @@ -2840,7 +2891,8 @@ enddef; % not mono. As with \gbc{orto}, we have a more memory efficient % \gbc{_subto} and now use that everywhere. \gbc{subto} is only used in % \gbc{coloraddto}, which is not used anymore. The binop version -% \DescribeRoutine{picsub}\gbc{picsub} is used only in \gbc{shadepic}. +% \DescribeRoutine{picsub}\gbc{picsub} +% is used only in \gbc{shadepic}. % \begin{macrocode} def subto (suffix u) (expr v) = mono (u); addto u also -v; cull u keeping (1, infinity); @@ -2874,18 +2926,21 @@ enddef; % When the last parameter \gbc{v} is the name of picture we can save % memory if we pass the name rather than the value. Problems with picture % memory turned up in the shading macros for \MF{} and the dashing macros -% for \MP{}. \DescribeRoutine{coloraddon}\gbc{coloraddon} applies this -% memory-saving trick and has completely replaced \gbc{coloraddto} in -% \grafbase{} code. Since \gbc{coloraddto} turned out to be used only with -% \gbc{u} equal to \gbc{active_plane}, we eliminate that parameter from +% for \MP{}. +% \DescribeRoutine{coloraddon} +% The macro \gbc{coloraddon} applies this memory-saving trick and has +% completely replaced \gbc{coloraddto} in \grafbase{} code. Since +% \gbc{coloraddto} turned out to be used only with \gbc{u} equal to +% \gbc{active_plane}, we have eliminated that parameter from % \gbc{coloraddon}. % % \DescribeRoutine{_orto} % This version of \gbc{orto} saves memory by passing \emph{both} % parameters by name. This also allows the application of \gbc{mono} to % both parameters. In addition to \gbc{coloraddon}, it is used in -% \gbc{shade} and \gbc{tess}. \DescribeRoutine{_subto}We also have -% \gbc{_subto}, an analogous version of \gbc{subto}. +% \gbc{shade} and \gbc{tess}. +% \DescribeRoutine{_subto} +% We also have \gbc{_subto}, an analogous version of \gbc{subto}. % \begin{macrocode} def coloraddto (expr clr) (suffix u) (expr v) = %<*MF> @@ -3204,7 +3259,7 @@ enddef; % % It may seem odd that black and white return the same thing. That is % because white is handled in the calling routine by subtracting the -% result. +% black result. % % The \gbc{setbbox} command was defined earlier, in % section~\ref{utilities}. The bounding rectangle it obtains is only @@ -3354,8 +3409,10 @@ enddef; % starts a tile named \gbc{fred} which will be 1 inch wide and 2 inches % tall, and any marks that extend beyond this rectangle are clipped off. % The tile is enclosed in a group to delimit these changes to the basic -% drawing parameters. \DescribeRoutine{endtile}\gbc{endtile} merely -% implements the clipping and then closes the group. +% drawing parameters. +% \DescribeRoutine{endtile} +% The macro \gbc{endtile} merely implements the clipping and then closes +% the group. % % In \MF, the picture should be a whole number of pixels in size, so that % the tiles fit perfectly together. The fact that shifts must be integer @@ -3510,11 +3567,11 @@ enddef; % \mfc{.5} (accurate enough, assuming pixel units). This is only called by % \gbc{tbbox}, which is never used. % -% \DescribeRoutine{xlimit} +% \DescribeRoutine{_xlimit} % \gbc{xlimit(x)} returns a value of true if the path \gbc{g} doesn't % cross the vertical line at \gbc{x}. -% \DescribeRoutine{ylimit}\gbc{ylimit(y)} is the same for the horizontal -% line at \gbc{y}. +% \DescribeRoutine{_ylimit} +% \gbc{ylimit(y)} is the same for the horizontal line at \gbc{y}. % \begin{macrocode} %<*unused> def tightbbox (expr g) (suffix ll, ur) = @@ -3603,7 +3660,8 @@ enddef; % (closed path) but an open path is supplied. In addition to the warning % in those commands, we also call \gbc{safedraw} for debugging purposes. % -% \DescribeRoutine{safefill}\RoutineIndex{colorsafefill} +% \DescribeRoutine{safefill} +% \RoutineIndex{colorsafefill} % The basic \gbc{safefill} simply calls the colored version with the % default parameter \gbc{fillcolor}. \gbc{colorsafefill} takes a color as % its first parameter and a path expression as second. These commands fill @@ -3707,7 +3765,8 @@ vardef stored (suffix fs) expr f = store (fs) f; f enddef; % % \subsection{Drawing}\label{drawing} % -% \DescribeRoutine{drawn}\RoutineIndex{colordrawn} +% \DescribeRoutine{drawn} +% \RoutineIndex{colordrawn} % The command \gbc{drawn} merely calls \gbc{colordrawn} with the default % color \gbc{drawcolor}. Then \gbc{colordrawn} takes a color \gbc{clr} % and a path expression \gbc{f} and returns the same path. In between, @@ -3725,12 +3784,15 @@ enddef; % sinewave shapes depending on the boolean first parameter. For \mfc{true} % we get smooth wiggles, for \mfc{false} we get jagged ones. In the % smooth case, a tension parameter allows an adjustment to the smoothness. -% The command \DescribeRoutine{zigzag}\RoutineIndex{colorzigzag} +% The command +% \DescribeRoutine{zigzag} +% \RoutineIndex{colorzigzag} % \gbc{zigzag} calls it with the value \mfc{false} and an arbitrary % value of the tension; -% \DescribeRoutine{sinewave}\RoutineIndex{colorsinewave}\gbc{sinewave} -% calls it with \mfc{true}, allowing it to pick up the tension parameter. -% All expect a quadruple of dimensions to follow +% \DescribeRoutine{sinewave} +% \RoutineIndex{colorsinewave} +% \gbc{sinewave} calls it with \mfc{true}, allowing it to pick up the +% tension parameter. All expect a quadruple of dimensions to follow % % The reason for using a loop (at the end) that draws the \gbc{sinewave} % path in pieces, is that all the turning can quickly exceed \MF{}'s limit @@ -3798,10 +3860,12 @@ enddef; % \end{macrocode} % -% \DescribeRoutine{corkscrew}\RoutineIndex{colorcorkscrew} -% This shares a lot of code with \gbc{zigzag} and \gbc{sinewave}, but -% the middle is considerably different, so it is not really possible to -% make a multipurpose command that can do all three. +% \DescribeRoutine{corkscrew} +% \RoutineIndex{colorcorkscrew} +% The definition of \gbc{corkscrew} shares a lot of code with \gbc{zigzag} +% and \gbc{sinewave}, but the middle is considerably different, so it is +% not really possible to make a multipurpose command that can do all +% three. % \begin{macrocode} def corkscrew = colorcorkscrew (drawcolor) enddef; vardef colorcorkscrew (expr clr, tens, blen, elen, len, wid) expr f = @@ -3856,13 +3920,14 @@ enddef; % % \subsection{Filling, unfilling and clipping}\label{filling} % -% \DescribeRoutine{filled}\RoutineIndex{colorfilled} +% \DescribeRoutine{filled} +% \RoutineIndex{colorfilled} % The command \gbc{filled} calls \gbc{colorfilled} with the default color % \gbc{fillcolor}. Then \gbc{colorfilled} takes a color \gbc{clr} and a % path expression \gbc{c}, returning the same path after subjecting % \gbc{zconv (c)} to \gbc{colorsafefill}. -% \DescribeRoutine{unfilled}\gbc{unfilled} returns the path after running -% \gbc{safeunfill}. +% \DescribeRoutine{unfilled} +% The macro \gbc{unfilled} returns the path after running \gbc{safeunfill}. % % \DescribeRoutine{Clip} % Finally, \gbc{Clip} is similar, running \gbc{safeclip}. The name @@ -4053,13 +4118,14 @@ enddef; % % \subsection{Hatching}\label{hatching} % -% \DescribeRoutine{thatch}\RoutineIndex{colorthatch} -% Hatch interior of path \gbc{f} (graph coordinates) with lines at angle -% \gbc{theta}, spaced \gbc{sp} apart (device coordinates). As usual an -% unclosed path is simply drawn. The thickness of the lines is determined -% by \gbc{hatchwd}. If \gbc{sp} is not greater than \gbc{abs(hatchwd)}, we -% simply fill. This will ensure \gbc{thatchf} is called only for positive -% \gbc{sp}. +% \DescribeRoutine{thatch} +% \RoutineIndex{colorthatch} +% This command hatches the interior of path \gbc{f} (graph coordinates) +% with lines at angle \gbc{theta}, spaced \gbc{sp} apart (device +% coordinates). As usual an unclosed path is simply drawn. The thickness +% of the lines is determined by \gbc{hatchwd}. If \gbc{sp} is not greater +% than \gbc{abs(hatchwd)}, we simply fill. This will ensure \gbc{thatchf} +% is called only for positive \gbc{sp}. % % We find the bounding box of the backward rotated path, so when that box % is filled with lines and rotated, it will cover the path. After calling @@ -4085,15 +4151,19 @@ enddef; % We offer some special cases, calling \gbc{thatch} with different angles. % These take only the spacing (in device coordinates) and a path % expression (in graph coordinates) as parameters.\\ -% \DescribeRoutine{hhatch}\gbc{hhatch} has angle 0 and so produces -% horizontal lines;\\ -% \DescribeRoutine{vhatch}\gbc{vhatch} produces vertical lines;\\ -% \DescribeRoutine{lhatch}\gbc{lhatch} produces lines tilted to the -% left (running from upper left to lower right);\\ -% \DescribeRoutine{rhatch}\gbc{rhatch} produces lines running from lower -% left to upper right; and\\ -% \DescribeRoutine{xhatch}\gbc{xhatch} produces -% cross-hatching, and essentially runs \gbc{lhatch} and \gbc{rhatch}. +% \DescribeRoutine{hhatch} +% \gbc{hhatch} has angle 0 and so produces horizontal lines;\\ +% \DescribeRoutine{vhatch} +% \gbc{vhatch} produces vertical lines;\\ +% \DescribeRoutine{lhatch} +% \gbc{lhatch} produces lines tilted to the left (running from upper left +% to lower right);\\ +% \DescribeRoutine{rhatch} +% \gbc{rhatch} produces lines running from lower left to upper right; +% and\\ +% \DescribeRoutine{xhatch} +% \gbc{xhatch} produces cross-hatching, and essentially runs \gbc{lhatch} +% and \gbc{rhatch}. % % Color is a parameter only for \gbc{colorxhatch}. The reason for that % is to make code written by \mfpic{} simpler. The \mfpic{} commands for @@ -4589,9 +4659,10 @@ def DASHED = Dashed enddef; % trained to use when dots are needed. % % After this \gbc{gendashed} is called with a pattern where the dashes are -% 0 length, the signal that dots are to be used. \DescribeRoutine{dotted} -% \gbc{dotted} is implemented by calling \gbc{doplot} with \gbc{dotpath} -% the symbol. +% 0 length, the signal that dots are to be used. +% \DescribeRoutine{dotted} +% The macro \gbc{dotted} is implemented by calling \gbc{doplot} with +% \gbc{dotpath} as the the symbol. % \begin{macrocode} vardef doplot (expr spath, sc, dgap) expr f = save dots; dashpat (dots) (0, dgap); @@ -4746,27 +4817,28 @@ enddef; % \end{macrocode} % -% \DescribeRoutine{plotsymbol}\RoutineIndex{colorplotsymbol} -% These place a symbol centered at each of the graph -% coordinate points in the list. The symbol placed is the first parameter, -% which would normally be a path, but can be a picture or, in \MP, a -% string. Like the \gbc{doplot} command, it calls \gbc{makesymbol}. +% \DescribeRoutine{plotsymbol} +% \RoutineIndex{colorplotsymbol} +% The \gbc{plotsymbol} command places a symbol centered at each of the +% graph coordinate points in the list. The symbol placed is the first +% parameter, which would normally be a path, but can be a picture or, in +% \MP, a string. Like the \gbc{doplot} command, it calls \gbc{makesymbol}. % If \gbc{spath} is of type path, and is cyclic, it is drawn filled. This % is because we call \gbc{makesymbol} on it, and that subjects it to % \gbc{setdot}, which has that behavior. For other types of symbols, we % simply convert them to pictures with \gbc{makesymbol} and then place -% them. Unlike \gbc{pointd} above, the interior of the path is not -% erased by default. However, in the special case where the symbol is an -% open path, if its first point is equal to its last point, and +% them. Unlike \gbc{pointd} above, the interior of the path is not erased +% by default. However, in the special case where the symbol is an open +% path, if its first point is equal to its last point, and % \gbc{clearsymbols} is true, then the interior of the path obtained by -% \gbc{\& cycle} is cleared before the path itself is drawn. -% We copy the text list to an array and call \gbc{dosymbols} so that -% \gbc{plotnodes}, \gbc{plotsymbol} and \gbc{showcontrols} can share the -% code. +% \gbc{\& cycle} is cleared before the path itself is drawn. We copy the +% text list to an array and call \gbc{dosymbols} so that \gbc{plotnodes}, +% \gbc{plotsymbol} and \gbc{showcontrols} can share the code. % % \DescribeRoutine{dosymbols} -% \gbc{dosymbols} uses identical code twice (once to clear, once to draw), -% so we put that code in \gbc{addsymbols}. \DescribeRoutine{addsymbols} +% Since \gbc{dosymbols} uses identical code twice (once to clear, once to +% draw), we put that code in \gbc{addsymbols}. +% \DescribeRoutine{addsymbols} % And finally, \gbc{addsymbols} draws copies of a symbol at a given array % of points with a given color. % \begin{macrocode} @@ -4865,10 +4937,11 @@ enddef; % \end{macrocode} % % \DescribeRoutine{xaxis} -% \gbc{xaxis} draws the $x$-axis through the point $(0,0)$ in graph -% coordinates. The only parameter is the length of the arrowhead in device -% coordinates. -% \DescribeRoutine{yaxis}\gbc{yaxis} draws the $y$-axis. +% The macro \gbc{xaxis} draws the $x$-axis through the point $(0,0)$ in +% graph coordinates. The only parameter is the length of the arrowhead in +% device coordinates. +% \DescribeRoutine{yaxis} +% The Macro \gbc{yaxis} draws the $y$-axis. % % \DescribeRoutine{axes} % \gbc{axes} draws both axes with the same length of head. @@ -5020,15 +5093,16 @@ enddef; % \end{macrocode} % % \DescribeRoutine{xmarks} +% And now the specialized command for each axis. Inside and outside +% really make no sense for the $x$- and +% \DescribeRoutine{ymarks} % \RoutineIndex{lmarks} % \RoutineIndex{bmarks} % \RoutineIndex{rmarks} % \RoutineIndex{tmarks} -% And now the specialized command for each axis. Inside and outside -% really make no sense for the $x$- and \DescribeRoutine{ymarks}$y$-axis, -% but since a bottom axis is usually used for $x$ and a left axis for $y$, -% we give \gbc{xmarks} the same first parameter as \gbc{bmarks} and -% \gbc{ymarks} the same as \gbc{lmarks}. +% $y$-axis, but since a bottom axis is usually used for $x$ and a left +% axis for $y$, we give \gbc{xmarks} the same first parameter as +% \gbc{bmarks} and \gbc{ymarks} the same as \gbc{lmarks}. % \begin{macrocode} def xmarks = axismarks ( 90, xtick, origin, right) enddef; def ymarks = axismarks (-90, ytick, origin, up) enddef; @@ -5039,15 +5113,17 @@ def tmarks = axismarks (-90, ttick, (0, yhigh), right) enddef; % \end{macrocode} % -% \DescribeRoutine{vargrid, vgrid} +% \DescribeRoutine{vargrid} +% \RoutineIndex{vgrid} % Mainly for the purpose of visualising coordinates, \gbc{vargrid} % draws a dot of size \gbc{dsize} at every point whose coordinates % are are \gbc{(n*xsp, m*ysp)}, \gbc{n} and \gbc{m} being integers. % \gbc{dsize} is in device coordinates, the spacings are in graph -% coordinates. \DescribeRoutine{grid}\gbc{grid} is for backward -% compatibility, calling \gbc{vargrid} with a default \gbc{dsize} of -% \mfc{.5bp}. The old name \gbc{vgrid} incorrectly suggests a -% connection to \gbc{vgridlines}. +% coordinates. +% \DescribeRoutine{grid} +% The macro \gbc{grid} is for backward compatibility, calling +% \gbc{vargrid} with a default \gbc{dsize} of \mfc{.5bp}. The old name +% \gbc{vgrid} incorrectly suggests a connection to \gbc{vgridlines}. % \begin{macrocode} path griddotpath; griddotpath := fullcircle; def grid = vargrid (0.5bp) enddef; @@ -5066,12 +5142,15 @@ def vgrid = vargrid enddef; % \end{macrocode} % +% \DescribeRoutine{gridlines} % This is more what I think of when I hear `grid', but the name was -% already taken. \DescribeRoutine{hgridlines}\gbc{hgridlines} draws -% horizontal lines through the same points where \gbc{grid} would draw -% dots, and \DescribeRoutine{vgridlines}\gbc{vgridlines} draws only -% vertical lines through the same points. Finally, -% \DescribeRoutine{gridlines}\gbc{gridlines} draws both. +% already taken. The macro \gbc{gridlines} draws horizontal and vertical +% lines through all the points that \gbc{grid} would draw. +% \DescribeRoutine{hgridlines} +% The macro \gbc{hgridlines} draws only the horizontal lines through the +% same points, while +% \DescribeRoutine{vgridlines} +% \gbc{vgridlines} draws only vertical lines. % \begin{macrocode} def hgridlines (expr ysp) = for n = ceiling ((ylow)/ysp) upto floor ((yhigh)/ysp): @@ -5089,29 +5168,31 @@ enddef; % \end{macrocode} % -% \DescribeRoutine{vectorfield} This command produces a field of arrows -% from a pair-valued formula (text parameter \gbc{fcn}) in a region -% described by a boolean-valued expression (text parameter \gbc{cond}). -% This routine simply makes functions (\mfc{vardef}\,s) out of the -% expressions and calls \DescribeRoutine{mkvectorfield} +% \DescribeRoutine{vectorfield} +% This command produces a field of arrows from a pair-valued formula (text +% parameter \gbc{fcn}) in a region described by a boolean-valued +% expression (text parameter \gbc{cond}). This routine simply makes +% functions (\mfc{vardef}\,s) out of the expressions and calls +% \DescribeRoutine{mkvectorfield} % \gbc{mkvectorfield}, which steps through the points described by % \gbc{xsp} and \gbc{ysp} and places an arrow (actually, any path) at -% each. The arrow path is given by the function \gbc{vf}. The arrow is placed -% at the point only if the function \gbc{isOK} returns true. It also omits -% points that lie in the axis margins. -% -% \DescribeRoutine{plrvectorfield} The polar version differs only in -% the distribution of the arrows. They are placed at regular intervals -% of $r$ an $\theta$. The text parameters should be expressions in -% \gbc{r} and \gbc{t}, but are otherwise the same. In particular, -% \gbc{fcn} should return \MF{} pairs, not polar coordinate pairs. The -% function \gbc{polar} can be used to convert if necessary. Its code is -% very similar, except for the boolean code needed to keep the -% vectors within the bounds of the graph. -% \DescribeRoutine{mkplrvectorfield} It calls \gbc{mkplrvectorfield}, -% which is a lot like the non-polar version, except it first calculates -% the extremes of the polar variables with \gbc{getpolarbounds} and relies -% on the boolean to keep it out of the axis margins. +% each. The arrow path is given by the function \gbc{vf}. The arrow is +% placed at the point only if the function \gbc{isOK} returns true. It +% also omits points that lie in the axis margins. +% +% \DescribeRoutine{plrvectorfield} +% The polar version differs only in the distribution of the arrows. They +% are placed at regular intervals of $r$ an $\theta$. The text parameters +% should be expressions in \gbc{r} and \gbc{t}, but are otherwise the +% same. In particular, \gbc{fcn} should return \MF{} pairs, not polar +% coordinate pairs. The function \gbc{polar} can be used to convert if +% necessary. Its code is very similar, except for the boolean code needed +% to keep the vectors within the bounds of the graph. +% \DescribeRoutine{mkplrvectorfield} +% It calls \gbc{mkplrvectorfield}, which is a lot like the non-polar +% version, except it first calculates the extremes of the polar variables +% with \gbc{getpolarbounds} and relies on the boolean to keep it out of +% the axis margins. % \begin{macrocode} def vectorfield (expr len, xsp, ysp) (text fcn) (text cond) = save _vf, _is_OK; @@ -5157,14 +5238,16 @@ enddef; % \end{macrocode} % % \DescribeRoutine{patcharcs} -% \gbc{patcharcs} draws on a picture \gbc{X} the arcs \gbc{tstart}${}\le -% \theta \le{}$\gbc{tstop} with radii starting at \gbc{rstart}, stepping -% by \gbc{rstep} until \gbc{rstop}. -% \DescribeRoutine{patchrays}\gbc{patchrays} draws the radial lines -% with $r$ coordinate varying between \gbc{rstart} and \gbc{rstop} at -% angles from \gbc{tstart} to \gbc{tstop} stepping by \gbc{tstep}. -% And \DescribeRoutine{plrpatch}\gbc{plrpatch} simply calls them both, -% and adds the resulting pictures to \gbc{active_plane}. +% The macro \gbc{patcharcs} draws on a picture \gbc{X} the arcs +% \gbc{tstart}${}\le \theta \le{}$\gbc{tstop} with radii starting at +% \gbc{rstart}, stepping by \gbc{rstep} until \gbc{rstop}. +% \DescribeRoutine{patchrays} +% The macro \gbc{patchrays} draws the radial lines with $r$ coordinate +% varying between \gbc{rstart} and \gbc{rstop} at angles from \gbc{tstart} +% to \gbc{tstop} stepping by \gbc{tstep}. +% \DescribeRoutine{plrpatch} +% And \gbc{plrpatch} simply calls them both, and adds the resulting +% pictures to \gbc{active_plane}. % \begin{macrocode} def patcharcs (suffix X) (expr rstart, rstop, rstep, tstart, tstop) = for rad = (if rstart = 0: rstep else: rstart fi) @@ -5201,9 +5284,12 @@ enddef; % % \DescribeRoutine{gridarcs} % \gbc{gridarcs} creates arcs having radii that are integer multiples of -% \gbc{rstep} and \DescribeRoutine{gridrays}\gbc{gridrays} draws radial -% lines at angles that are multiples of \gbc{tstep}. The command -% \DescribeRoutine{polargrid}\gbc{polargrid}simply calls the first two. +% \gbc{rstep} and +% \DescribeRoutine{gridrays} +% \gbc{gridrays} draws radial lines at angles that are multiples of +% \gbc{tstep}. +% \DescribeRoutine{polargrid} +% The command \gbc{polargrid}simply calls the first two. % % \DescribeRoutine{polargridpoints} % On the other hand, \gbc{polargridpoints} draws dots at the points where @@ -5261,11 +5347,13 @@ enddef; % \end{macrocode} % % \DescribeRoutine{beginpolargrid} -% This calls \gbc{getpolarbounds} to compute the bounds (on $r$ and -% $\theta$) of the smallest polar coordinate patch that covers the graph -% rectangle. \DescribeRoutine{getpolarbounds}That command leaves the values -% in \gbc{rmin}, \gbc{rmax}, \gbc{tmin} and \gbc{tmax}. Then it -% initializes \gbc{gridpic} whereon the grids are drawn. +% The macro \gbc{beginpolargrid} calls \gbc{getpolarbounds} to compute the +% bounds (on $r$ and $\theta$) of the smallest polar coordinate patch that +% covers the graph rectangle. +% \DescribeRoutine{getpolarbounds} +% That command leaves the values in \gbc{rmin}, \gbc{rmax}, \gbc{tmin} and +% \gbc{tmax}. Then \gbc{beginpolargrid} initializes \gbc{gridpic} whereon +% the grids are drawn. % \begin{macrocode} def beginpolargrid = begingroup; @@ -5423,13 +5511,15 @@ enddef; % % These produce the perpendicular from \,\gbc{point n of t}\, to the % (extension of) the opposite side (i.e., the altitude). -% \DescribeRoutine{altitudept}The first one determines where the altitude -% meets the opposite side, and the \DescribeRoutine{altitude}second just -% connects the two points. Since \gbc{altitudept} is always \gbc{point 1 -% of altitude}, it is actually redundant. However, the command -% \gbc{medianpt} (defined below) is used outside of the construction of -% \gbc{median}, so it seemed possible the \gbc{altitudept} might be useful -% also. +% \DescribeRoutine{altitudept} +% The first one determines where the altitude meets the opposite side, and +% the +% \DescribeRoutine{altitude} +% second just connects the two points. Since \gbc{altitudept} is always +% \gbc{point 1 of altitude}, it is actually redundant. However, the +% command \gbc{medianpt} (defined below) is used outside of the +% construction of \gbc{median}, so it seemed possible the \gbc{altitudept} +% might be useful also. % % We need a cycle so that points $n+1$ and $n+2$ will wrap around to the % start of the path when necessary. @@ -5450,8 +5540,10 @@ enddef; % \end{macrocode} % % \DescribeRoutine{medianpt} -% These two produce the midpoint of the side opposite \,\gbc{point n of t}\, -% and the \DescribeRoutine{median}line connecting those two points. +% These next two produce the midpoint of the side opposite +% \,\gbc{point n of t}\, and the +% \DescribeRoutine{median} +% line connecting those two points. % \begin{macrocode} vardef medianpt expr n of t = 0.5[pnt[n + 1] (t), pnt[n + 2] (t)] @@ -5466,7 +5558,9 @@ enddef; % \DescribeRoutine{anglebisectorpt} % The first produces the point on the side opposite \,\gbc{point n of t}\, % where the angle bisector at that corner crosses it and the second -% produces \DescribeRoutine{anglebisector}the line that bisects that angle. +% produces +% \DescribeRoutine{anglebisector} +% the line that bisects that angle. % \begin{macrocode} vardef anglebisectorpt expr n of t = save A, B, C; pair A, B, C; @@ -5540,8 +5634,10 @@ enddef; % \DescribeRoutine{polyline} % This is the \mfpic{} interface. Instead of an array name, it accepts a % list of pair expressions, forms an array from them and calls -% \gbc{mkpoly}. \DescribeRoutine{NoPoints} prints a warning and sets the -% array a single point, the origin. +% \gbc{mkpoly}. +% \DescribeRoutine{NoPoints} +% \mfc{NoPoints} prints a warning and sets the array to a single point, +% the origin. % \begin{macrocode} vardef polyline (expr cyclic) (text t) = setpairs (_pl) (t); @@ -5761,10 +5857,12 @@ enddef; % \gbc{mksmooth} on the array. % % The next pair call \gbc{mkconvex}, which tries to produce a convex curve -% when the points form a convex polygon. The first, -% \DescribeRoutine{ccurve}\gbc{ccurve}, merely calls the second with a -% default texnsion, while \DescribeRoutine{tccurve}creates an array from -% the list of pairs and calls \gbc{mkconvex} on it. +% when the points form a convex polygon. +% \DescribeRoutine{ccurve} +% The first, \gbc{ccurve}, merely calls the second with a default texnsion, +% while +% \DescribeRoutine{tccurve} +% creates an array from the list of pairs and calls \gbc{mkconvex} on it. % \begin{macrocode} numeric default_tension; default_tension := 1; def curve = tcurve (default_tension) enddef; @@ -5786,11 +5884,14 @@ enddef; % what these are for. % % \DescribeRoutine{mkbezier} -% \gbc{mkbezier} takes an array argument and produces either an open or -% cyclic path with a given tension. \DescribeRoutine{bezier}\gbc{bezier} -% does nothing more than call \gbc{tbezier} with the default tension, -% \DescribeRoutine{tbezier}which takes a list of points and creates an -% array for \gbc{mkbezier} to act on. +% The command \gbc{mkbezier} takes an array argument and produces either +% an open or cyclic path with a given tension. +% \DescribeRoutine{bezier} +% The macro \gbc{bezier} does nothing more than call \gbc{tbezier} with +% the default tension, +% \DescribeRoutine{tbezier} +% which takes a list of points and creates an array for \gbc{mkbezier} to +% act on. % \begin{macrocode} vardef mkbezier (expr tens, cyclic) (suffix pts) = settension (_tn) tens; fixtension (_tn); @@ -5952,8 +6053,9 @@ enddef; % % \DescribeRoutine{fcncurve} % This is the \mfpic{} interface; \gbc{fcncurve} calls \gbc{functioncurve} -% with the default tension, and \DescribeRoutine{functioncurve}then -% takes a list of points, converts it to an array, and calls +% with the default tension, and +% \DescribeRoutine{functioncurve} +% then takes a list of points, converts it to an array, and calls % \gbc{mkfcnpath} to build the path. % \begin{macrocode} vardef fcncontrol (expr ftens, X, Y, Z) = @@ -5991,22 +6093,23 @@ enddef; % % \DescribeRoutine{openqbs} % For simplicity, the list is converted to an array \gbc{_oq} first. In -% the closed version \DescribeRoutine{closedqbs}additional array elements -% are created at the end, repeating two of the beginning elements. -% Finally, +% the closed version +% \DescribeRoutine{closedqbs} +% additional array elements are created at the end, repeating two of the +% beginning elements. Finally, % \DescribeRoutine{mkqbs} % \gbc{mkqbs} is called. This draws an open spline based on the points in % an array \gbc{b}. The additional array elements defined by % \gbc{closedqbs} cause the resulting path to end where it began and a % simple \mfc{\&cycle} closes it. % -% \DescribeRoutine{qspline} The \mfpic{} commands \cs{qspline} and -% \cs{closedqspline} now call \gbc{qspline} with appropriate boolean, for -% consistency with other commands that have the same argument structure. -% The commands \gbc{openqbs}, and \gbc{closedqbs} are no longer needed, -% but are kept for backward compatability. The most efficient setup would -% be to give \gbc{mkqbs} a boolean argument, but that could break old -% files. +% \DescribeRoutine{qspline} +% The \mfpic{} commands \cs{qspline} and \cs{closedqspline} now call +% \gbc{qspline} with appropriate boolean, for consistency with other +% commands that have the same argument structure. The commands +% \gbc{openqbs}, and \gbc{closedqbs} are no longer needed, but are kept +% for backward compatability. The most efficient setup would be to give +% \gbc{mkqbs} a boolean argument, but that could break old files. % \begin{macrocode} def openqbs = qspline (false) enddef; def closedqbs = qspline (true) enddef; @@ -6041,9 +6144,11 @@ enddef; % nodes of these segments are half way between the second control of one % segment and the first control of the next. % -% \DescribeRoutine{mkcbs}The main code is in \gbc{mkcbs}, which results -% in an open curve. For backward compatibility, the alias -% \DescribeRoutine{mkopencbs}\gbc{mkopencbs} is supplied. +% \DescribeRoutine{mkcbs} +% The main code is in \gbc{mkcbs}, which results in an open curve. For +% backward compatibility, the alias +% \DescribeRoutine{mkopencbs} +% \gbc{mkopencbs} is supplied. % % \DescribeRoutine{mkclosedcbs} % Earlier versions of \gbc{mkclosedcbs} would partly redefine its suffix @@ -6056,16 +6161,17 @@ enddef; % \DescribeRoutine{opencbs} % These are the versions taking a list of points instead of an array name. % They create a temporary array and call \gbc{mkcbs}, with -% \DescribeRoutine{closedcbs}\gbc{closedcbs} extending the array, just -% like the quadratic versions. -% -% \DescribeRoutine{cspline} The \mfpic{} commands \cs{cspline} and -% \cs{closedcspline} now call \gbc{cspline} with appropriate boolean, for -% consistency with other commands that have the same argument structure. -% The commands \gbc{mkopencbs}, \gbc{opencbs}, and \gbc{closedcbs} are no -% longer needed, but are kept for backward compatability. The most -% efficient setup would be to give \gbc{mkcbs} a boolean argument, but -% that could break old files. +% \DescribeRoutine{closedcbs} +% \gbc{closedcbs} extending the array, just like the quadratic versions. +% +% \DescribeRoutine{cspline} +% The \mfpic{} commands \cs{cspline} and \cs{closedcspline} now call +% \gbc{cspline} with appropriate boolean, for consistency with other +% commands that have the same argument structure. The commands +% \gbc{mkopencbs}, \gbc{opencbs}, and \gbc{closedcbs} are no longer +% needed, but are kept for backward compatability. The most efficient +% setup would be to give \gbc{mkcbs} a boolean argument, but that could +% break old files. % \begin{macrocode} vardef mkcbs (suffix b) = (b[1]+4b[2]+b[3])/6 @@ -6134,19 +6240,21 @@ enddef; % \gbc{_spl_post[\,]} to unknown arrays of pairs. These will hold the % control points. % -% \DescribeRoutine{closed_spline_eqns}The next two macros contain the -% additional equations: for a closed spline these are the same as the -% interior equation, but at the first and last point in the array. For -% \DescribeRoutine{relaxed_spline_eqns}relaxed splines they force -% the second derivative to be 0 at the first and last point. +% \DescribeRoutine{closed_spline_eqns} +% The next two macros contain the additional equations: for a closed +% spline these are the same as the interior equation, but at the first and +% last point in the array. +% \DescribeRoutine{relaxed_spline_eqns} +% For relaxed splines they force the second derivative to be 0 at the +% first and last point. % % The macro \gbc{mksplinepath} simply assembles the previously computed % points and controls into a path. % -% \DescribeRoutine{mkspline}\gbc{mkspline} issues the -% common equations and then either the closed equations (\gbc{closed = -% true}) or the relaxed equations (\gbc{closed = false}), before calling -% \gbc{mksplinepath}. +% \DescribeRoutine{mkspline} +% The macro \gbc{mkspline} issues the common equations and then either the +% closed equations (\gbc{closed = true}) or the relaxed equations +% (\gbc{closed = false}), before calling \gbc{mksplinepath}. % % The knowledgeable user can call \gbc{init_spline_eqns}, append any % choice of equations for the end segments, and then call @@ -6264,11 +6372,13 @@ enddef; % and \gbc{_sl[\,]} (the desired slopes) and issues the common equations. % The parameter \gbc{pts} is the array of $(x,y)$ values. % -% \DescribeRoutine{periodic_fcnspl_eqns}For the periodic case we -% use \gbc{periodic_fcnspl_eqns} to generate the additional -% equations and for the \DescribeRoutine{relaxed_fcnspl_eqns}relaxed case -% we use \gbc{relaxed_fcnspl_eqns}. As before, one can produce custom -% splines by issuing the common equations and then ones own equations. +% \DescribeRoutine{periodic_fcnspl_eqns} +% For the periodic case we use \gbc{periodic_fcnspl_eqns} to generate the +% additional equations and for the +% \DescribeRoutine{relaxed_fcnspl_eqns} +% relaxed case we use \gbc{relaxed_fcnspl_eqns}. As before, one can +% produce custom splines by issuing the common equations and then ones own +% equations. % % \DescribeRoutine{mkfcnsplpath} % Then we assemble the path from the computed information by calling the @@ -6475,15 +6585,16 @@ enddef; % \end{macrocode} % % \DescribeRoutine{arcpp} -% In this, two points and the radius of the circle are given. Alone, this -% would determine two circles and therefore 4 arcs. We reduce the -% possibilities to two by assuming the arc is anticlockwise from the first -% point to the second if \gbc{rad} is positive, clockwise if negative. -% Then \gbc{arcpp} produces the one that has absolute value no more than -% 180 degrees if \gbc{small} is true, otherwise the other one. -% \DescribeRoutine{arcppr}\gbc{arcppr} is just \gbc{arcpp} with the -% boolean argument \gbc{small} last (for compatibility with previous -% \mfpic{} versions). +% In the macro \gbc{arcpp}, two points and the radius of the circle are +% given. Alone, this would determine two circles and therefore 4 arcs. We +% reduce the possibilities to two by assuming the arc is anticlockwise +% from the first point to the second if \gbc{rad} is positive, clockwise +% if negative. Then \gbc{arcpp} produces the one that has absolute value +% no more than 180 degrees if \gbc{small} is true, otherwise the other +% one. +% \DescribeRoutine{arcppr} +% The macro \gbc{arcppr} is just \gbc{arcpp} with the boolean argument +% \gbc{small} last (for compatibility with previous \mfpic{} versions). % % The code computes the angle of the arc and calls \gbc{arcpps}. If the % radius is not larger than half the distance between the points, we make @@ -6570,23 +6681,25 @@ enddef; % % The next four implement different ways of specifying a circle. % \DescribeRoutine{circlecp} -% The first produces the circle with a given center passing through a -% given point. +% The first, \gbc{circlecp}, produces the circle with a given center +% passing through a given point. % \DescribeRoutine{circleppp} -% The second produces the circle passing through three given points. +% The second, \gbc{circleppp}, produces the circle passing through three +% given points. % \DescribeRoutine{circlepps} -% The third produces the circle passing through two given points -% in such a way that the arc from the first to the second has a given -% angle. +% The third, \gbc{circlepps}, produces the circle passing through two +% given points in such a way that the arc from the first to the second has +% a given angle. % \DescribeRoutine{circleppr} -% The fourth produces the circle with the given radius passing -% through the two points in such a way that the angle from the first point -% to the second is between $0$ and $180$ degrees if the switch \gbc{small} -% is true. If \gbc{small} is false, then the clockwise arc from first to -% second is between $180$ and $360$. If \gbc{rad} is negative, the -% circles switch and their orientation is reversed. -% \DescribeRoutine{circlepp}\gbc{circlepp} is just \gbc{circleppr} with -% a different order of arguments (for previous \mfpic{} versions). +% The fourth, \gbc{circleppr}, produces the circle with the given radius +% passing through the two points in such a way that the angle from the +% first point to the second is between $0$ and $180$ degrees if the switch +% \gbc{small} is true. If \gbc{small} is false, then the clockwise arc +% from first to second is between $180$ and $360$. If \gbc{rad} is +% negative, the circles switch and their orientation is reversed. +% \DescribeRoutine{circlepp} +% The last, \gbc{circlepp}, is just \gbc{circleppr} with a different order +% of arguments (for previous \mfpic{} versions). % % These could be implemented by finding the center and radius and calling % \gbc{circle}. However, we call the arc commands so that those points @@ -6655,22 +6768,25 @@ enddef; % This is just the circle through the three corners. % % \DescribeRoutine{incircle} -% This produces the circle inside the triangle that is tangent to all -% three sides. It makes use of the fact that the two tangent -% points on the sides adjacent to corner \gbc{A} (for example) are +% The command \gbc{incircle} produces the circle inside the triangle that +% is tangent to all three sides. It makes use of the fact that the two +% tangent points on the sides adjacent to corner \gbc{A} (for example) are % equidistant from \gbc{A}. The three equations then express the fact that % the sum of the two distances from the tangent point to the corners on % the same side add up to the length of the side. -% \DescribeRoutine{excircle} In \gbc{excircle}, a corner is given (by -% number from $0$ to $2$) and the circle is produced that is -% \emph{outside} the triangle and is tangent to the side opposite the -% point and tangent to the extensions of the other two sides. +% +% \DescribeRoutine{excircle} +% In \gbc{excircle}, a corner is given (by number from $0$ to $2$) and the +% circle is produced that is \emph{outside} the triangle and is tangent to +% the side opposite the point and tangent to the extensions of the other +% two sides. % % \DescribeRoutine{ninepointcircle} -% This circle passes through the following nine points: the midpoint of -% each side, the point on each side (extended, if necessary) where the -% altitude from the opposite corner meets it, and the midpoint of the -% segments connecting each corner to the intersection of the altitudes. +% The ``nine-point circle'' passes through the following nine points: the +% midpoint of each side, the point on each side (extended, if necessary) +% where the altitude from the opposite corner meets it, and the midpoint +% of the segments connecting each corner to the intersection of the +% altitudes. % \begin{macrocode} vardef circumcircle expr t = circleppp (pnt0 (t), pnt1 (t), pnt2 (t)) @@ -6712,7 +6828,7 @@ enddef; % One supplies a point that must be inside the unit circle or above % the $x$-axis, and a radius that must be less than $1$. Some degenerate % cases will not generate an error. We code this with a boolean that -% determine whether the disk of the half-plane is to be assumed. +% determines whether the disk or the half-plane is to be assumed. % \begin{macrocode} vardef pshcircle (expr disk, ctr, rad) = if disk: @@ -6826,7 +6942,8 @@ enddef; % end at \gbc{pf(bmax)} even if that is not an integer multiple of % \gbc{bst}. % -% \DescribeRoutine{tfcn}This is included for backward compatibility. +% \DescribeRoutine{tfcn} +% The macro \gbc{tfcn} is included for backward compatibility. % \begin{macrocode} vardef mkfcn (expr sm, tens) (expr bmin, bmax, bst) (text pf) = save _p; pair _p[]; _p := 0; @@ -6932,7 +7049,8 @@ enddef; % can be copied literally into a \mfc{vardef} creating a numeric function % with a literal \gbc{t} as the parameter (representing $\theta$). % -% \DescribeRoutine{btwnplrfcn} This is the polar version of \gbc{btwnfcn}. +% \DescribeRoutine{btwnplrfcn} +% The macro \gbc{btwnplrfcn} is the polar version of \gbc{btwnfcn}. % \begin{macrocode} def plrfcn (expr sm) = tplrfcn (sm, default_tension) enddef; vardef tplrfcn (expr sm, tens, tmin, tmax, st) (text ft) = @@ -7091,8 +7209,9 @@ enddef; % This closes the path in the manner that \gbc{mksmooth} creates a path. % This will change the first and last segment of the original path. In % particular, if there are fewer than three segments, the whole path can -% be different. It has a variant \DescribeRoutine{sclosedt}\gbc{sclosedt} -% that takes a tension argument. +% be different. +% \DescribeRoutine{sclosedt} +% It has a variant \gbc{sclosedt} that takes a tension argument. % \begin{macrocode} def sclosed = sclosedt (default_tension) enddef; vardef sclosedt (expr t) expr f = @@ -7115,7 +7234,8 @@ enddef; % This closes with the basic default \MF{} Bezi\'er. It is a smooth % closure, but it does not have the same direction at the endpoints % that \gbc{mksmooth (true)} would have produced. It has a tense variant -% \DescribeRoutine{bclosedt}\gbc{bclosedt} +% \DescribeRoutine{bclosedt} +% \gbc{bclosedt} % \begin{macrocode} def bclosed = bclosedt (default_tension) enddef; vardef bclosedt (expr t) expr f = @@ -7129,7 +7249,9 @@ enddef; % % \DescribeRoutine{uclosed} % Same as \gbc{bclosed}. Retained for backward compatibility. There is -% a tense variant only for \DescribeRoutine{uclosedt}consistency. +% a tense variant only for +% \DescribeRoutine{uclosedt} +% consistency. % \begin{macrocode} def uclosed = bclosed enddef; def uclosedt = bclosedt enddef; @@ -7458,8 +7580,10 @@ enddef; % (ii)~the size, (iii)~a rotation adjustment, and (iv)~a position % adjustment. % -% \DescribeRoutine{headpath}\RoutineIndex{colorheadpath} -% \RoutineIndex{headpathx}\RoutineIndex{colorheadpathx} +% \DescribeRoutine{headpath} +% \RoutineIndex{colorheadpath} +% \RoutineIndex{headpathx} +% \RoutineIndex{colorheadpathx} % \gbc{headpath} calls \gbc{Gheadpath}, a more general command that takes % a boolean expression and a shape (path) suffix as arguments. It % supplies \mfc{false} for the boolean and \gbc{Arrowhead} for the shape. @@ -7475,8 +7599,10 @@ def colorheadpathx = colorGheadpath (true) (Arrowhead) enddef; % \end{macrocode} % -% \DescribeRoutine{Gheadpath}\RoutineIndex{colorGheadpath} -% \RoutineIndex{Gheadpathx}\RoutineIndex{colorGheadpathx} +% \DescribeRoutine{Gheadpath} +% \RoutineIndex{colorGheadpath} +% \RoutineIndex{Gheadpathx} +% \RoutineIndex{colorGheadpathx} % For general arrowhead shapes we require two paths; one giving the shape % of the head and the other the shape that is cleared when the boolean % parameter \gbc{trim} is true. We pass this information by name with a @@ -7560,22 +7686,25 @@ path cut_path; cut_path := (.5,0)--(.5,.71)--(-.5,.71)--(-.5,0)--cycle; % \end{macrocode} % -% \DescribeRoutine{tailpath}\RoutineIndex{colortailpath} -% This places a tail at the start of a path. It is almost like -% \gbc{Gheadpath} except there is no clearing done and the tip is at the -% start (point 0) of the path. Also, the position parameter \gbc{pos} is a -% forward shift. +% \DescribeRoutine{tailpath} +% \RoutineIndex{colortailpath} +% The macro \gbc{tailpath} places a tail at the start of a path. It is +% almost like \gbc{Gheadpath} except there is no clearing done and the tip +% is at the start (point 0) of the path. Also, the position parameter +% \gbc{pos} is a forward shift. % -% \DescribeRoutine{midpath}\RoutineIndex{colormidpath} -% This is just like \gbc{tailpath} except it puts the given shape -% somewhere in the middle of the path. Its position parameter indicates -% the fraction of the length of the path where the shape is to be placed. -% This works best in two cases: the shape has a definite direction (like -% the \gbc{Arrowhead}) and the tip is placed at the given position, or the -% shape has a center of symmetry and that is placed at the given position. -% We obtain this in most cases by shifting $(0,0)$ to that position. The -% standard arrowhead has its tip at this point, and the standard symbols -% (with the exception of \gbc{Circle}) have their center of symmetry there. +% \DescribeRoutine{midpath} +% \RoutineIndex{colormidpath} +% The macro \gbc{midpath} is just like \gbc{tailpath} except it puts the +% given shape somewhere in the middle of the path. Its position parameter +% indicates the fraction of the length of the path where the shape is to +% be placed. This works best in two cases: the shape has a definite +% direction (like the \gbc{Arrowhead}) and the tip is placed at the given +% position, or the shape has a center of symmetry and that is placed at +% the given position. We obtain this in most cases by shifting $(0,0)$ to +% that position. The standard arrowhead has its tip at this point, and the +% standard symbols (with the exception of \gbc{Circle}) have their center +% of symmetry there. % \begin{macrocode} def tailpath (suffix sh) = colortailpath (sh) (headcolor) enddef; vardef colortailpath (suffix sh) (expr clr, sc, rot, pos) expr f = @@ -7634,17 +7763,20 @@ enddef; % randomly scale $|z\sb1-z\sb0|$. % % The following `\gbc{deviate}s' are analogous to \MF{}'s -% \mfc{uniformdeviate}. The first, \DescribeRoutine{signeddeviate} -% \gbc{signeddeviate X}, produces a random number uniformly distributed in -% $(-X, X)$. The second, \DescribeRoutine{scaledeviate} +% \mfc{uniformdeviate}. +% \DescribeRoutine{signeddeviate} +% The first, \gbc{signeddeviate X}, produces a random number uniformly +% distributed in $(-X, X)$. The second, +% \DescribeRoutine{scaledeviate} % \gbc{scaledeviate (W, A)}, produces a pair in a particular direction -% with length distributed in $(2^{-w}, 2^w)$. The third, -% \DescribeRoutine{polardeviate}\gbc{polardeviate R} produces a pair -% whose polar coordinates are separately uniformly distributed, the radius -% over the interval $(0, R)$ the angle over $(0,360)$. The last, -% \DescribeRoutine{xydeviate}\gbc{xydeviate (X,Y)}, produces a pair -% uniformly distributed over the rectangle with corners at $(-X,-Y)$ and -% $(X,Y)$. +% with length distributed in $(2^{-w}, 2^w)$. +% \DescribeRoutine{polardeviate} +% The third, \gbc{polardeviate R} produces a pair whose polar coordinates +% are separately uniformly distributed, the radius over the interval $(0, +% R)$ the angle over $(0,360)$. +% \DescribeRoutine{xydeviate} +% The last, \gbc{xydeviate (X,Y)}, produces a pair uniformly distributed +% over the rectangle with corners at $(-X,-Y)$ and $(X,Y)$. % % \DescribeRoutine{randompair} % Finally, \gbc{randompair} runs \gbc{polardeviate} if \gbc{X} is @@ -8135,9 +8267,10 @@ endfor % \DescribeRoutine{gcd} % I thought I was going to use \gbc{gcd} for the \gbc{mkstar} routine % above, but went another way. Still, it might have a future use. Once we -% have it, \DescribeRoutine{lcm}\gbc{lcm} is a snap. Since \gbc{gcd} -% always returns a positive result, \gbc{lcm} satisfies the usual rule for -% signs of products. +% have it, +% \DescribeRoutine{lcm} +% \gbc{lcm} is a snap. Since \gbc{gcd} always returns a positive result, +% \gbc{lcm} satisfies the usual rule for signs of products. % \begin{macrocode} vardef gcd (expr n, m) = save a, b, r; @@ -8176,10 +8309,11 @@ defaultsymbols; % \DescribeRoutine{setdatacolors} % Finally, for \MP, we do a similar pair of commands for setting % the colors for the \cs{plotdata} command, and for -% \DescribeRoutine{getcolor}getting the next one. The odd indirection -% (\gbc{colortype[]} is an array of strings, the names of variables -% having color values) is because \MP{} now has three different data -% types for colors. Arrays must be all one type. +% \DescribeRoutine{getcolor} +% getting the next one. The odd indirection (\gbc{colortype[]} is an array +% of strings, the names of variables having color values) is because \MP{} +% now has three different data types for colors. Arrays must be all one +% type. % % \DescribeRoutine{defaultcolors} % These default colors were tested on screen and on an inkjet printer. @@ -8209,7 +8343,7 @@ def setdatacolors (text lst) = string colortype[], _tmpstr; for _itm = _datacolors: % % Each string is the name of some color variable - _tmpstr := "colortype_"&romannumeral(colortype); + _tmpstr := "colortype_" & GBromannumeral(colortype); setcolor (scantokens(_tmpstr)) _itm; colortype[colortype] := _tmpstr; next colortype; diff --git a/Master/texmf-dist/source/generic/mfpic/mfpic.dtx b/Master/texmf-dist/source/generic/mfpic/mfpic.dtx index ea14d37321c..cc427bbf7f2 100644 --- a/Master/texmf-dist/source/generic/mfpic/mfpic.dtx +++ b/Master/texmf-dist/source/generic/mfpic/mfpic.dtx @@ -1,10 +1,10 @@ % \iffalse %%% File: mfpic.dtx -%%% A part of mfpic 1.04 2010/03/30 +%%% A part of mfpic 1.05 2010/06/10 %%% % ------------------------------------------------------------------- % -% Copyright 2002--2009, Daniel H. Luecking +% Copyright 2002--2010, Daniel H. Luecking % % Mfpic may be distributed and/or modified under the conditions of the % LaTeX Project Public License, either version 1.3b of this license or (at @@ -22,7 +22,7 @@ % %\ProvidesPackage{mfpic} %<*sty> - [2010/03/30 v1.04. Macros for drawing with Metafont/MetaPost.]% + [2010/06/10 v1.05. Macros for drawing with Metafont/MetaPost.]% % %<*driver> \documentclass{ltxdoc} @@ -170,9 +170,9 @@ \ifx\mfpfileversion\UndEfInEd\else\expandafter\endinput\fi% {% \catcode\lq\.12 \catcode\lq\/12% - \gdef\mfpfileversion{1.04}% - \gdef\mfpfiledate{2010/03/30}% - \gdef\mfpicversion{104}% + \gdef\mfpfileversion{1.05}% + \gdef\mfpfiledate{2010/06/10}% + \gdef\mfpicversion{105}% }% % \end{macrocode} % @@ -246,9 +246,10 @@ % To turn on debugging before option processing, the user must make sure % \cs{mfpicdebug} is defined. \cs{mfp@DBlog} writes it contents to the % log file only if debugging is on. -% \DescribeMacro{\ifmfpicdebug}\cs{ifmfpicdebug} is normally set to true -% if the user loads \mfpic{} with the \opt{debug} option, or sets it -% directly with \cs{mfpicdebugtrue} after loading. +% \DescribeMacro{\ifmfpicdebug} +% The switch \cs {ifmfpicdebug} is normally set to true if the user loads +% \mfpic{} with the \opt{debug} option, or sets it directly with +% \cs{mfpicdebugtrue} after loading. % \begin{macrocode} \newif\ifmfpicdebug \ifx\mfpicdebug\UndEfInEd \mfpicdebugfalse @@ -614,10 +615,11 @@ % \DescribeMacro{\setmfvariable} % A useful abbreviation for a common requirement: declaring and setting % a \MF{} variable. I have decided to change it to a user-level macro for -% power users. For consistency, \DescribeMacro{\setmpvariable}\cs{setmpvariable} -% is an alternative name for it. It takes three arguments: the type of -% variable, the variable itself, and its value. -% Example:\\ +% power users. +% \DescribeMacro{\setmpvariable} +% For consistency, \cs{setmpvariable} is an alternative name for it. It +% takes three arguments: the type of variable, the variable itself, and +% its value. Example:\\ % \indent \cs{setmfvariable}\marg{numeric}\marg{shadewd}\marg{.7pt}.\\ % Since the \MF{} code \mfc{save}\,s the variable, there must be no % suffix. This is not a big problem since mostly it is for internal use. @@ -695,10 +697,10 @@ % \DescribeMacro{\usecenteredcaptions} % This (\opt{centeredcaptions}) is the simplest option. Other options % follow a similar pattern: a user-level command \cs{usecenteredcaptions} -% is defined for turning it on and another -% \DescribeMacro{\nocenteredcaptions}\cs{nocenteredcaptions} is defined -% for turning it off. Selection of centered captions can be turned on or -% off at will throughout a document. +% is defined for turning it on and another, +% \DescribeMacro{\nocenteredcaptions} +% \cs{nocenteredcaptions}, is defined for turning it off. Selection of +% centered captions can be turned on or off at will throughout a document. % \begin{macrocode} \newdef\usecenteredcaptions{\mfp@let\ifmfp@centcapt\iftrue}% \newdef\nocenteredcaptions {\mfp@let\ifmfp@centcapt\iffalse}% @@ -707,11 +709,12 @@ % % \DescribeMacro{\useraggedcaptions} % Here we define the settings for justified and ragged captions. -% Justified captions are the default. Ragged cptions are normally +% Justified captions are the default. Ragged captions are normally % raggedright, but are ragged on both sides if \opt{centeredcaptions} is -% in effect. \DescribeMacro{\noraggedcaptions}For justified captions, -% lines are justified on both sides, except the last is centered under -% \opt{centeredcaptions}. +% in effect. +% \DescribeMacro{\noraggedcaptions} +% For justified captions, lines are justified on both sides, except the +% last is centered under \opt{centeredcaptions}. % \begin{macrocode} \newdef\useraggedcaptions{\mfp@let\mfp@capsettings\mfp@raggedcap}% \newdef\noraggedcaptions{\mfp@let\mfp@capsettings\mfp@justifiedcap}% @@ -757,8 +760,9 @@ % \DescribeMacro{\clipmfpic} % The \opt{clip} option shows only what's inside the rectangle given in % the \cs{mfpic} command. It can be turned on or off for each figure -% independently. \DescribeMacro{\noclipmfpic}The default is the old -% behavior: no clipping. +% independently. +% \DescribeMacro{\noclipmfpic} +% The default is the old behavior: no clipping. % \begin{macrocode} \mfp@makeoption\clipmfpic\noclipmfpic{clipall}\ifmfp@clip % \end{macrocode} @@ -766,7 +770,8 @@ % \DescribeMacro{\usetruebbox} % The \opt{truebbox} option lets \MP{} set the true bounding box (which % may differ from the numbers defined through \cs{mfpic}). -% \DescribeMacro{\notruebbox}The default is the old behavior, \cs{notruebbox}. +% \DescribeMacro{\notruebbox} +% The default is the old behavior, \cs{notruebbox}. % % We don't need to be too careful with the scope of these option % commands. As currently written, \TeX{} never needs to know the setting @@ -783,10 +788,11 @@ % An option to let \MP{} create labels, \opt{mplabels} mostly just % switches between two versions of \cs{tlabel} so no \MP{} booleans % are set and so synchronization of scope is not an issue. -% \DescribeMacro{\nomplabels}The default is the old behavior: labels are -% placed by \TeX. The actual setting is delayed until \cs{opengraphsfile} -% so the order of these commands and \cs{usemetapost} is not significant -% (before \cs{opengraphsfile}). +% \DescribeMacro{\nomplabels} +% The default is the old behavior: labels are placed by \TeX. The actual +% setting is delayed until \cs{opengraphsfile} so the order of these +% commands and \cs{usemetapost} is not significant (before +% \cs{opengraphsfile}). % % Because of the frequent need to check this setting, we define % \cs{@ifmplabels} to execute one of two alternatives based on it. @@ -808,8 +814,9 @@ % \DescribeMacro{\overlaylabels} % The option \opt{overlaylabels} instructs \MP{} to defer adding labels % until the end of the picture. That means they don't get clipped or -% covered up by any drawing elements. \DescribeMacro{\nooverlaylabels}The -% default is the old behavior, \cs{nooverlaylabels}. Neither of these +% covered up by any drawing elements. +% \DescribeMacro{\nooverlaylabels} +% The default is the old behavior, \cs{nooverlaylabels}. Neither of these % commands affect \MF, but they write to the output file anyway if issued % after \cs{opengraphsfile}. % \begin{macrocode} @@ -820,8 +827,9 @@ % \DescribeMacro{\clearsymbols} % The option \opt{clearsymbols} causes the symbols drawn by % \cs{plotsymbol} and \cs{plotnodes} to have their interiors erased before -% being drawn. \DescribeMacro{\noclearsymbols}The default is the old -% behavior: \cs{noclearsymbols}. +% being drawn. +% \DescribeMacro{\noclearsymbols} +% The default is the old behavior: \cs{noclearsymbols}. % \begin{macrocode} \mfp@makeoption% \clearsymbols\noclearsymbols{clearsymbols}\ifmfp@clearsym @@ -834,13 +842,14 @@ % in \MF.) The \MF{} code prevents the figure from being added to the font, % the \TeX{} switch \cs{ifmfp@noship} is checked before \cs{endmfpic} % attempts to add the (nonexistent) figure to the document. -% \DescribeMacro{\resumeshipping}\cs{resumeshipping} restores character -% shipping. +% \DescribeMacro{\resumeshipping} +% The macro \cs{resumeshipping} restores character shipping. % -% \DescribeMacro{\noship}\cs{noship} is the older name for -% \cs{stopshipping}. Its name indicated that it was intended for use in -% one picture. This is not actually an option (that is, there is no -% corresponding \cs{DeclareOption} in \LaTeX), but it is coded the same. +% \DescribeMacro{\noship} +% The macro \cs{noship} is the older name for \cs{stopshipping}. Its name +% indicated that it was intended for use in one picture. This is not +% actually an option (that is, there is no corresponding +% \cs{DeclareOption} in \LaTeX), but it is coded the same. % \begin{macrocode} \mfp@makeoption\stopshipping\resumeshipping{noship}\ifmfp@noship \newlet\noship\stopshipping @@ -861,8 +870,9 @@ % \DescribeMacro{\mfpicllx} % The code to include a figure has been divided into three parts. Under % \opt{metapost} we need to both include the figure and save the -% \DescribeMacro{\mfpiclly} bounding box coordinates of the lower left -% corner. Here we initialize the macros that hold these coordinates. +% \DescribeMacro{\mfpiclly} +% bounding box coordinates of the lower left corner. Here we initialize +% the macros that hold these coordinates. % \begin{macrocode} \newdef\mfpicllx{0}% \newdef\mfpiclly{0}% @@ -1344,13 +1354,15 @@ % \cs{mfp@write}, and then invoke the appropriate continuation command. % % \DescribeMacro{\mfsrc} -% This one is the most basic, merely writing its contents. For figure -% macros, we ultimately call -% \DescribeMacro{\mfcmd}\cs{mfcmd}, which appends a semicolon, -% terminating any pending \MF{} command. For macros which take a comma -% separated list of values as their arguments, we call -% \DescribeMacro{\mflist}\cs{mflist} which surrounds the list in -% parentheses and appends a semicolon +% The macro \cs{mfsrc} is the most basic, merely writing its contents. For +% figure macros, we ultimately call +% \DescribeMacro{\mfcmd} +% \cs{mfcmd}, which appends a semicolon, terminating any pending \MF{} +% command. For macros which take a comma separated list of values as their +% arguments, we call +% \DescribeMacro{\mflist} +% \cs{mflist} which surrounds the list in parentheses and appends a +% semicolon % % The ending code is in \cs{mfp@src}. The \cs{begingroup} in % \cs{mfp@write} matches the \cs{endgroup} in \cs{mfp@src}. The group @@ -2144,11 +2156,12 @@ \newlet\globalsetmparray\globalsetmfarray % \end{macrocode} % -% Shade adjustment macros. -% \DescribeMacro{\lightershade}\cs{lightershade} -% just multiplies \cs{shadespace} by $1.2$. While -% \DescribeMacro{\darkershade}\cs{darkershade} divides by $1.2$ -% (actually, multiplies by $1/1.2$) +% \DescribeMacro{\lightershade} +% Shade adjustment macros. \cs{lightershade} just multiplies +% \cs{shadespace} by $1.2$. +% \DescribeMacro{\darkershade} +% While \cs{darkershade} divides by $1.2$ (actually, multiplies by +% $1/1.2$) % \begin{macrocode} \newdef\lightershade{\shadespace1.2\shadespace}% \newdef\darkershade{\shadespace.83333\shadespace}% @@ -2168,7 +2181,9 @@ % \DescribeMacro{\pointfilltrue} % With the commands \cs{pointfilltrue} or \cs{pointfillfalse} the user % can specify points drawn with the \cs{point} command to be either -% filled in or \DescribeMacro{\pointfillfalse}not. +% filled in or +% \DescribeMacro{\pointfillfalse} +% not. % \begin{macrocode} \let\ifpointfill\iftrue \newdef\pointfilltrue{\mfp@let\ifpointfill\iftrue}% @@ -2189,21 +2204,23 @@ % \DescribeMacro{\mfpfor} % This is the simplest: it writes the word \mfc{for} plus the contents of % its only mandatory argument, followed by a colon. The loop is ended by -% \DescribeMacro{\endmfpfor}\cs{endmfpfor} which merely writes the text -% \mfc{endfor}. +% \DescribeMacro{\endmfpfor} +% \cs{endmfpfor} which merely writes the text \mfc{endfor}. % \begin{macrocode} \newdef\mfpfor#1{\begingroup\mfsrc{for #1:}}% \newdef\endmfpfor{\mfsrc{endfor}\endgroup}% % \end{macrocode} % % \DescribeMacro{\mfploop} -% This starts a loop with \mfc{forever}. The user is expected to provide -% an escape condition with \DescribeMacro{\mfpuntil}\cs{mfpuntil}, which -% can be placed anywhere among the commands contained in the -% \env{mfploop} environment. \DescribeMacro{\endmfploop}\cs{endmfploop} -% is a clone of \cs{mfpfor} except for the warning. Grouping keeps -% the warning from being turned off if \cs{mfpuntil} occurs in a nested -% loop. +% The macro \cs{mfploop} starts a loop with \mfc{forever}. The user is +% expected to provide an escape condition with +% \DescribeMacro{\mfpuntil} +% \cs{mfpuntil}, which can be placed anywhere among the commands contained +% in the \env{mfploop} environment. +% \DescribeMacro{\endmfploop} +% The macro \cs{endmfploop} is a clone of \cs{endmfpfor} except for the +% warning. Grouping keeps the warning from being turned off if +% \cs{mfpuntil} occurs in a nested loop. % \begin{macrocode} \newdef\mfploop{% \begingroup\mfsrc{forever:}\let\@nountil\mfp@untilwarn}% @@ -2215,8 +2232,9 @@ % This emulates a while-loop, the condition being given in the mandatory % argument. It has the same behavior, and writes almost the same code as % \cs{mfploop} with an immediate \cs{mfpuntil} using the negative of the -% condition. The closing, \DescribeMacro{\endmfpwhile}\cs{endmfpwhile}, -% is again the same as \cs{endmfpfor}. +% condition. +% \DescribeMacro{\endmfpwhile} +% The closing, \cs{endmfpwhile}, is again the same as \cs{endmfpfor}. % \begin{macrocode} \newdef\mfpwhile#1{\begingroup\mfcmd{forever: exitif not(#1)}}% \newlet\endmfpwhile\endmfpfor @@ -2397,9 +2415,10 @@ % \cs{mfp@src}), and some \TeX{} code. That code is written into the string % argument of the \grafbase{} command \gbc{mftitle} and ends up in the % \MF{} \file{.log} file and as a comment in the GF file. \cs{mftitle} -% merely calls \cs{mfp@title}, while \DescribeMacro{\tmtitle}\cs{tmtitle} -% also writes the argument to the \TeX{} \file{.log} file and typesets it -% in the document. +% merely calls \cs{mfp@title}, while +% \DescribeMacro{\tmtitle} +% \cs{tmtitle} also writes the argument to the \TeX{} \file{.log} file and +% typesets it in the document. % % We write the argument as a token list because that is the the easiest % verbatim-like way to do it. @@ -2930,11 +2949,11 @@ % \DescribeMacro{\mfplinetype} % The user-level command \cs{mfplinetype} allows the user to set the % starting value of \cs{mfp@linetype}. The default is to start at $0$. -% \DescribeMacro{\mfplinestyle}\cs{mfplinestyle} is an alias for this -% same command. The names `linestyle' and `linetype' come from -% an analogous system of changing rendering in \prog{gnuplot}. (The -% reason for two names is that \prog{gnuplot} documentation was not -% consistent in its terminology.) +% \DescribeMacro{\mfplinestyle} +% The macro \cs{mfplinestyle} is an alias for this same command. The names +% `linestyle' and `linetype' come from an analogous system of changing +% rendering in \prog{gnuplot}. (The reason for two names is that +% \prog{gnuplot} documentation was not consistent in its terminology.) % \begin{macrocode} \newdef\mfplinetype#1{\mfp@local\mfp@linetype#1\relax}% \newlet\mfplinestyle\mfplinetype @@ -3001,22 +3020,24 @@ % positions: centered on the axes, on one side, or on the other side. % The default for the $x$- and $y$-axes is centered, for the border axes it % is inside. -% \DescribeMacro{\setaxismarks}For changing this we provide the -% \cs{setaxismarks} command, whose first argument is the axis letter, and -% whose second argument is one of the words \texttt{inside}, -% \texttt{outside}, \texttt{centered}, \texttt{ontop}, \texttt{onbottom}, -% \texttt{onleft}, or \texttt{onright}. +% \DescribeMacro{\setaxismarks} +% For changing this we provide the \cs{setaxismarks} command, whose first +% argument is the axis letter, and whose second argument is one of the +% words \texttt{inside}, \texttt{outside}, \texttt{centered}, +% \texttt{ontop}, \texttt{onbottom}, \texttt{onleft}, or \texttt{onright}. % % \DescribeMacro{\setxmarks} % \cs{setxmarks} takes one argument and sets the position for the $x$ axis % only, while -% \DescribeMacro{\setymarks}\cs{setymarks} does the same for the $y$ axis. -% For the border axes we provide -% \DescribeMacro{\setbordermarks}\cs{setbordermarks}, which takes four -% arguments: the positions for the left, bottom, right and top axis (in -% that order). The abbreviation -% \DescribeMacro{\setallbordermarks}\cs{setallbordermarks} takes one -% argument and sets the position for all border axis marks to that. +% \DescribeMacro{\setymarks} +% \cs{setymarks} does the same for the $y$ axis. For the border axes we +% provide +% \DescribeMacro{\setbordermarks} +% \cs{setbordermarks}, which takes four arguments: the positions for the +% left, bottom, right and top axis (in that order). +% \DescribeMacro{\setallbordermarks} +% The abbreviation \cs{setallbordermarks} takes one argument and sets the +% position for all border axis marks to that. % \begin{macrocode} \newdef\setaxismarks#1#2{\setmfnumeric{#1tick}{#2}}% \newdef\setxmarks#1{\setaxismarks x{#1}}% @@ -3041,9 +3062,10 @@ % be `\texttt{s}' and \cs{mfp@tension} to be the optional argument. % Default tension is empty rather than 1 so we can implement a scheme to % change the actual default used. -% \DescribeMacro{\unsmoothdata}\cs{unsmoothdata} defines -% \cs{mfp@smoothness} to be `\texttt{p}' and \cs{mfp@tension} to be -% empty. The latter might not be necessary. +% \DescribeMacro{\unsmoothdata} +% The macro \cs{unsmoothdata} defines \cs{mfp@smoothness} to be +% `\texttt{p}' and \cs{mfp@tension} to be empty. The latter might not be +% necessary. % \begin{macrocode} \newdef\mfp@smdata#1{\mfp@def\mfp@smoothness{#1}% \mfp@nullopt{\mfp@def\mfp@tension}}% @@ -3057,13 +3079,14 @@ % controls which datum is plotted against which by \cs{plotdata} and % \cs{datafile}. % -% \DescribeMacro{\usingpairdefault}\cs{usingpairdefault} sets the default, -% which is to read the first two space separated words on a line as the -% $x$ and $y$ coordinate of a point. To allow that there might be more -% data on a line, it is also assumed that the second word is followed by a -% space and the rest of the line is read as a third parameter that is not -% used. In case there are only two words, \mfpic{} will always add a space -% on the end and then the third parameter will be empty. +% \DescribeMacro{\usingpairdefault} +% The macro \cs{usingpairdefault} sets the default, which is to read the +% first two space separated words on a line as the $x$ and $y$ coordinate +% of a point. To allow that there might be more data on a line, it is also +% assumed that the second word is followed by a space and the rest of the +% line is read as a third parameter that is not used. In case there are +% only two words, \mfpic{} will always add a space on the end and then the +% third parameter will be empty. % % \DescribeMacro{\usingnumericdefault} % For the occasional command that needs numeric data, @@ -3113,13 +3136,14 @@ % something like \cs{mfpdatacomment}\marg{\cs{\#}}. This also changes the % percent character to category `other'. We can also use the percent sign % as part of the numeric data by placing -% \DescribeMacro{\makepercentother}\cs{makepercentother} before the -% \cs{using} command to turn `\texttt\%' into an ordinary character. -% \DescribeMacro{\makepercentcomment}\cs{makepercentcomment} returns it to -% its usual role as a comment. Every file reading command issues -% \cs{mfp@setcomment} before reading. The count register -% \cs{mfp@commentchar} holds the ASCII code of the current comment -% character, the default being the percent sign. +% \DescribeMacro{\makepercentother} +% \cs{makepercentother} before the \cs{using} command to turn `\texttt\%' +% into an ordinary character. +% \DescribeMacro{\makepercentcomment} +% \cs{makepercentcomment} returns it to its usual role as a comment. Every +% file reading command issues \cs{mfp@setcomment} before reading. The +% count register \cs{mfp@commentchar} holds the ASCII code of the current +% comment character, the default being the percent sign. % \begin{macrocode} \newcount\mfp@commentchar \mfp@commentchar`\%% \newdef\makepercentother{\@makeother\%}% @@ -3343,18 +3367,22 @@ % % \DescribeMacro{\polyline} % The most basic, a polyline or polygonal path, \cs{polyline} draws line -% segments from each point to the next. \DescribeMacro{\lines}\cs{lines} -% is an alias. -% -% \DescribeMacro{\closedpolyline}\cs{closedpolyline} does the -% same, except it produces a closed path, connecting the last point to the -% first. \DescribeMacro{polygon}\cs{polygon} is an alias. -% -% \DescribeMacro{\computedspline}The \cs{computedspline} command takes a -% list of points and computes the controls of a cubic spline that connects -% the points. Adjacent segments have matching first and second derivatives -% at the common endpoint. It is limited to what is called a \emph{relaxed} -% spline, which has zero curvature at the beginning and ending points. +% segments from each point to the next. +% \DescribeMacro{\lines} +% \cs{lines} is an alias. +% +% \DescribeMacro{\closedpolyline} +% The macro \cs{closedpolyline} does the same, except it produces a closed +% path, connecting the last point to the first. +% \DescribeMacro{polygon} +% \cs{polygon} is an alias. +% +% \DescribeMacro{\computedspline} +% The \cs{computedspline} command takes a list of points and computes the +% controls of a cubic spline that connects the points. Adjacent segments +% have matching first and second derivatives at the common endpoint. It is +% limited to what is called a \emph{relaxed} spline, which has zero +% curvature at the beginning and ending points. % % \DescribeMacro{\closedcomputedspline} % This is similar, but computes the unique \emph{closed} cubic spline that @@ -3378,29 +3406,30 @@ % the triples $p\sb{n-1}, p\sb{n}, p\sb1$ and $p\sb{n}, p\sb1, p\sb2$ as % being `successive'. % -% \DescribeMacro{\cspline} This produces cubic splines. The points -% determine the curve as follows: for successive points $p\sb i, p\sb -% {i+1}$ in the list, the line segment connecting them is divided into -% thirds with two points $q\sb i$ and $q\sb i'$. The curve then passes -% through the midpoint of the segment from $q\sb {i-1}'$ to $q\sb i$ and -% tangent to that segment. This causes adjacent B\'ezier segments to have -% matching first and second derivatives at their common endpoint. Each -% four successive data points determines one segment of the path. +% \DescribeMacro{\cspline} +% The macro \cs{cspline} produces cubic splines. The points determine the +% curve as follows: for successive points $p\sb i, p\sb {i+1}$ in the +% list, the line segment connecting them is divided into thirds with two +% points $q\sb i$ and $q\sb i'$. The curve then passes through the +% midpoint of the segment from $q\sb {i-1}'$ to $q\sb i$ and tangent to +% that segment. This causes adjacent B\'ezier segments to have matching +% first and second derivatives at their common endpoint. Each four +% successive data points determines one segment of the path. % -% \DescribeMacro{\closedcspline} The closed variant works by viewing the -% first point as a succesor of the last point, creating three additional -% path segments. +% \DescribeMacro{\closedcspline} +% The closed variant works by viewing the first point as a succesor of the +% last point, creating three additional path segments. % % \DescribeMacro{\qbeziers} % This produces the equivalent of a sequence of \LaTeX{} \cs{qbezier} % commands. The mandatory argument will be a list of points alternating % between nodes and control points, ending with the last node. -% \DescribeMacro{\closedqbeziers}The closed version ends with the control -% point between the last node and the first. Therefore, the \cs{qbeziers} -% command needs an odd number of points in the list, while -% \cs{closedqbeziers} needs an even number. If this is not the case, the -% last point in the list is repeated, causing the final segment to be a -% straight line (closed case) or trivial. +% \DescribeMacro{\closedqbeziers} +% The closed version ends with the control point between the last node and +% the first. Therefore, the \cs{qbeziers} command needs an odd number of +% points in the list, while \cs{closedqbeziers} needs an even number. If +% this is not the case, the last point in the list is repeated, causing +% the final segment to be a straight line (closed case) or trivial. % % Note that quadratic B\'eziers need not be smooth at the nodes unless % the control points line up. Our plural name distinguishes it from the @@ -3409,8 +3438,10 @@ % \DescribeMacro{\cbeziers} % Like the above, except it produces a cubic B\'ezier. It requires a % list of $3n+1$ points in the pattern node-control-control, ending with -% an extra node. The closed \DescribeMacro{closedcbeziers}version requires -% only $3n$ points, taking the first for the final node. +% an extra node. +% \DescribeMacro{closedcbeziers} +% The closed version requires only $3n$ points, taking the first for the +% final node. % % \DescribeMacro{\fcnspline} % The above splines are two dimensional splines, that is, functions of @@ -3470,22 +3501,26 @@ % for the curve, at point $p\sb n$ to be traveling parallel to the direction % from $p\sb {n-1}$ to $p\sb {n+1}$ (except at the first and last point). % -% The closed version \DescribeMacro{\closedcurve}\cs{closedcurve} treats the +% \DescribeMacro{\closedcurve} +% The closed version \cs{closedcurve} treats the % first point and last point the same as the rest. It has the alias -% \DescribeMacro{\cyclic}\cs{cyclic}. +% \DescribeMacro{\cyclic} +% \cs{cyclic}. % % \DescribeMacro{\convexcurve} % This convex version produces a smooth curve that is convex in those % places where \cs{polyline} (with the same list of points) would produce -% a convex shape. \DescribeMacro{\closedconvexcurve}It also comes in a closed -% version, with the alias \DescribeMacro{\convexcyclic} +% a convex shape. +% \DescribeMacro{\closedconvexcurve} +% It also comes in a closed version, with the alias +% \DescribeMacro{\convexcyclic} % \cs{convexcyclic}. % % \DescribeMacro{\mfbezier} % This produces the standard \MF{} cubic B\'ezier using the \MF{} path % join operator (\mfc{..}) with tension given by an optional argument. -% \DescribeMacro{\closedmfbezier}The closed version connects the last -% point to the first in the same way. +% \DescribeMacro{\closedmfbezier} +% The closed version connects the last point to the first in the same way. % % The command \cs{mfp@curve} examines the optional argument and writes % the command name (first argument, possibly modified) with the @@ -3689,7 +3724,8 @@ % \cs{mfobj}\marg{\meta{name}} is a figure macro, and should act exactly % the same as if the figure macro that had been stored in the variable % were typed in its place. Its one argument is the variable name. -% \DescribeMacro{\mpobj}\cs{mpobj} is another name for the same command. +% \DescribeMacro{\mpobj} +% The macro \cs{mpobj} is just another name for the same command. % \begin{macrocode} \newlet\mfobj\mfp@figmac \newlet\mpobj\mfobj % \end{macrocode} @@ -3698,10 +3734,11 @@ % The command \cs{mfpimage} starts a group in which drawing commands % work just as usual, except they draw in a picture variable, whose name % is the only mandatory argument to \cs{mfpimage}. -% \DescribeMacro{\endmfpimage}The command \cs{endmfpimage} ends that -% group. There is an optional argument to set the reference point of the -% created picture, the default being \gbc{(0,0)}. The resulting picture -% can then be placed using \cs{putmfpimage}. +% \DescribeMacro{\endmfpimage} +% The command \cs{endmfpimage} ends that group. There is an optional +% argument to set the reference point of the created picture, the default +% being \gbc{(0,0)}. The resulting picture can then be placed using +% \cs{putmfpimage}. % \begin{macrocode} \newdef\mfpimage{\mfp@defaultopt\mfp@image{(0,0)}}% \newdef\endmfpimage{\mfcmd{\@nl concludeimage}}% @@ -3750,9 +3787,10 @@ % This produces a subpath of the following path. Its mandatory argument % contains two numbers separated by a comma. The numbers should be between % 0 and 1 and produce a fraction of the following path. -% \DescribeMacro{\subpath}\cs{subpath} has a similar argument, but the -% numbers are between $0$ and the number of segments in the path, and it -% produces the equivalent of \MF's \mfc{subpath} primitive. +% \DescribeMacro{\subpath} +% The macro \cs{subpath} has a similar argument, but the numbers are +% between $0$ and the number of segments in the path, and it produces the +% equivalent of \MF's \mfc{subpath} primitive. % \begin{macrocode} \newdef\partpath{\mfp@modi{partialpath}}% \newdef\subpath{\mfp@modi{gsubpath}}% @@ -3788,7 +3826,8 @@ % % \DescribeMacro{\dashed} % \cs{dashed} and \cs{dotted} take one optional argument, which should -% contain the length of the dashes (diameter of \DescribeMacro{\dotted} +% contain the length of the dashes (diameter of +% \DescribeMacro{\dotted} % dots) and the length of the spaces between, separated by a comma. % % Several rendering macros take an optional argument which is written as @@ -3830,7 +3869,9 @@ % This creates a coil, or corkscrew-shaped rendering. In this case % \meta{dim$\sb3$} is the distance from one loop to the next and % \meta{dim$\sb4$} is the maximum distance to each side of the path. -% An alias, \DescribeMacro{\corkscrew}\cs{corkscrew}, is provided. +% An alias, +% \DescribeMacro{\corkscrew} +% \cs{corkscrew}, is provided. % % Both \cs{sinewave} and \cs{corkscrew} take an optional `tension' % argument that affects the smoothness of the result. The default is $1$ @@ -3903,21 +3944,23 @@ % the tension value (empty if there is no tension option). % % \DescribeMacro{\sclosed} -% The first closes smoothly in the same manner that \cs{curve} creates a -% smooth path. \DescribeMacro{\bclosed}The second uses an ordinary \MF{} -% B\'ezier. These two have an optional argument: the amount of tension to -% put in the connecting link. This makes no sense with the rest. +% The first, \cs{sclosed} closes smoothly in the same manner that +% \cs{curve} creates a smooth path. +% \DescribeMacro{\bclosed} +% The second, \cs{bclosed}, uses an ordinary \MF{} B\'ezier. These two +% have an optional argument: the amount of tension to put in the +% connecting link. This makes no sense with the rest. % % \DescribeMacro{\lclosed} -% \cs{lclosed} always draws a straight line from the end of a path to -% its start. +% The macro \cs{lclosed} always draws a straight line from the end of a +% path to its start. % % \DescribeMacro{\cbclosed} -% \cs{cbclosed} computes a closure by calculating cubic B-spline control -% points from the path data and then generating a connecting spline (see -% \cs{cspline}). -% \DescribeMacro{\qbclosed}\cs{qbclosed} is similar, but quadratic -% B-splines are used. +% The macro \cs{cbclosed} computes a closure by calculating cubic B-spline +% control points from the path data and then generating a connecting +% spline (see \cs{cspline}). +% \DescribeMacro{\qbclosed} +% The macro \cs{qbclosed} is similar, but quadratic B-splines are used. % % \DescribeMacro{\uclosed} % At one time \cs{uclosed} was defined in a more complicated manner than @@ -3981,11 +4024,13 @@ % others. Its first optional argument is the separation \emph{and} the % angle (default $0$) of the lines, separated by a comma. The other % hatching macros have a fixed angle. -% \DescribeMacro{\lhatch}\cs{lhatch} has lines at a $-45$ -% degree angle (upper left to lower right), -% \DescribeMacro{\rhatch}\cs{rhatch} produces the opposite -% diagonal (angle $45$ degrees), and \DescribeMacro{\xhatch}\cs{xhatch} -% does both sets of lines (cross hatching). +% \DescribeMacro{\lhatch} +% The macro \cs{lhatch} has lines at a $-45$ degree angle (upper left to +% lower right), +% \DescribeMacro{\rhatch} +% \cs{rhatch} produces the opposite diagonal (angle $45$ degrees), and +% \DescribeMacro{\xhatch} +% \cs{xhatch} does both sets of lines (cross hatching). % \begin{macrocode} \newdef\thatch{\mfp@defaultopt\mfp@thatch{\the\hatchspace,0}}% \newdef\lhatch{\mfp@defaultopt\mfp@lhatch{\the\hatchspace}}% @@ -4190,9 +4235,10 @@ % \DescribeMacro{\arrowtail} % Tails are just like heads except that there is no star-form and the % \grafbase{} command name (second parameter of \cs{mfp@arr}) is -% different. And \DescribeMacro{\arrowmid}\cs{arrowmid} is just like -% \cs{arrowtail} except for the command name and the different default for -% the position optional argument. +% different. +% \DescribeMacro{\arrowmid} +% And \cs{arrowmid} is just like \cs{arrowtail} except for the command +% name and the different default for the position optional argument. % \begin{macrocode} \newdef\arrowtail##1{\mfp@arr 0{tailpath (##1)}}% \newdef\arrowmid##1{\mfp@arr{0.5}{midpath (##1)}}% @@ -4206,12 +4252,12 @@ % The following apply transforms to the \MF{} coordinate system, and % these can be localized with the \env{coords} environment. In plain % \TeX{} \cs{coords} starts the environment and -% \DescribeMacro{\endcoords}\cs{endcoords} closes it. The transforms -% apply when the curve is \emph{rendered} and do not affect what paths are -% defined. Thus, for example, \cs{store} will store the same path -% whatever the state of the coordinate system. In terms of \grafbase{} -% commands, only \gbc{vtr} and \gbc{ztr} are changed, and these are only -% applied when rendering. +% \DescribeMacro{\endcoords} +% \cs{endcoords} closes it. The transforms apply when the curve is +% \emph{rendered} and do not affect what paths are defined. Thus, for +% example, \cs{store} will store the same path whatever the state of the +% coordinate system. In terms of \grafbase{} commands, only \gbc{vtr} and +% \gbc{ztr} are changed, and these are only applied when rendering. % % \DescribeMacro{\applyT} % These are implemented by \cs{applyT} which takes as its argument a \MF{} @@ -4259,12 +4305,14 @@ % % \DescribeMacro{\axes} % The original \cs{axes} was therefore not a figure macro. It always drew -% both axes with solid lines. \DescribeMacro{\xaxis}Later \cs{xaxis} and -% \cs{yaxis} were introduced, which mimicked the behavior of \cs{axes}. -% For backward \DescribeMacro{\yaxis}compatibility, the old behavior is -% supported with the old commands. The optional argument to \cs{axes}, -% \cs{xaxis} and \cs{yaxis} is the length of the arrowhead, defaulting to -% \cs{the}\cs{axisheadlen}. +% both axes with solid lines. +% \DescribeMacro{\xaxis} +% Later \cs{xaxis} and \cs{yaxis} were introduced, which mimicked the +% behavior of \cs{axes}. For backward +% \DescribeMacro{\yaxis} +% compatibility, the old behavior is supported with the old commands. The +% optional argument to \cs{axes}, \cs{xaxis} and \cs{yaxis} is the length +% of the arrowhead, defaulting to \cs{the}\cs{axisheadlen}. % \begin{macrocode} \newdef\xaxis{\mfp@defaultopt{\mfp@simple{xaxis}}{\the\axisheadlen}}% \newdef\yaxis{\mfp@defaultopt{\mfp@simple{yaxis}}{\the\axisheadlen}}% @@ -4281,10 +4329,10 @@ % (the arrowhead length) and one mandatory argument, a single letter % designating the axis to draw. % -% \DescribeMacro{\axisline}The \cs{axisline} command is provided for users -% who want more control. It is a figure macro that produces the -% corresponding line, and the user can use all the flexibility of the -% \cs{arrowhead} command if necessary. +% \DescribeMacro{\axisline} +% The \cs{axisline} command is provided for users who want more control. +% It is a figure macro that produces the corresponding line, and the user +% can use all the flexibility of the \cs{arrowhead} command if necessary. % \begin{macrocode} \newdef\axis{\mfp@nullopt\mfp@axis}% \newdef\axisline##1{\mfp@figmac{axisline.##1}}% @@ -4296,10 +4344,10 @@ % with nothing separating them except optional spaces. \cs{doaxes} is % implemented via the self-looping macro \cs{mfp@doaxis}. % -% \DescribeMacro{\border}The \cs{border} command is almost equivalent to -% \cs{doaxes}\marg{lbrt}, except it is a figure macro. With it, the -% whole picture can be filled with a background color, or outlined in any -% available rendering. +% \DescribeMacro{\border} +% The \cs{border} command is almost equivalent to \cs{doaxes}\marg{lbrt}, +% except it is a figure macro. With it, the whole picture can be filled +% with a background color, or outlined in any available rendering. % \begin{macrocode} \newdef\doaxes{\mfp@nullopt\mfp@doaxes}% \newdef\border{\mfp@figmac{borderrect}}% @@ -4310,7 +4358,8 @@ % \cs{axismarks} command (\cs{marks} was the original choice, but that % turned out to conflict with one of e\kern-.06em\TeX's primitives). % For brevity, therefore, we also have separate commands -% \DescribeMacro{\xmarks}\cs{xmarks}, +% \DescribeMacro{\xmarks} +% \cs{xmarks}, % \cs{ymarks}\SpecialUsageIndex\ymarks, % \cs{lmarks}\SpecialUsageIndex\lmarks, % \cs{bmarks}\SpecialUsageIndex\bmarks, @@ -4389,10 +4438,13 @@ % \DescribeMacro{\plrgridpoints} % \cs{plrgridpoints} is similar but places only dots at the intersections % of these arcs and rays. It takes an optional argument for the size of -% the dots, default \cs{griddotsize}. \DescribeMacro{\gridarcs}\cs{gridarcs} -% draws only the arcs. Its only parameter is the distance between them (in -% graph units). \DescribeMacro{\gridrays}\cs{gridrays} draws only the rays -% and its parameter is the angle separating the rays. +% the dots, default \cs{griddotsize}. +% \DescribeMacro{\gridarcs} +% The macro \cs{gridarcs} draws only the arcs. Its only parameter is the +% distance between them (in graph units). +% \DescribeMacro{\gridrays} +% The macro \cs{gridrays} draws only the rays and its parameter is the +% angle separating the rays. % % \DescribeMacro{\plrpatch} % \cs{plrpatch} draws: a circular arc at a starting radius, then @@ -4657,7 +4709,8 @@ % % \DescribeMacro{\mfppiechart} % We make \cs{mfppiechart} and \cs{mfpbarchart}\label{charts} global, -% since all they do is define variables \DescribeMacro{\mfpbarchart} +% since all they do is define variables +% \DescribeMacro{\mfpbarchart} % and arrays. % \begin{macrocode} \newdef\mfppiechart{\mfp@defaultopt\mfp@piechart{c}}% @@ -5046,6 +5099,7 @@ \newdef\mfp@vectorfield#1#2#3#4#5{% \mfcmd{#1vectorfield (#2, #3) (#4) (#5)}}% % \end{macrocode} +% % The first argument of both these is the optional size argument of the % calling commands (\cs{point} and \cs{plotsymbol}). For % \cs{mfp@plotsymbol} the second argument is the symbol name. @@ -5105,9 +5159,9 @@ % \DescribeMacro{\everymfpic} % This takes a token list and saves it in \cs{every@mfpic} to be issued % at the very end of the \cs{mfpic} command. There is a companion macro -% \DescribeMacro{\everyendmfpic} that is issued at the very beginning of -% \cs{endmfpic}. These are always global, otherwise they are defined much -% like \cs{everytlabel}. +% \DescribeMacro{\everyendmfpic} +% that is issued at the very beginning of \cs{endmfpic}. These are always +% global, otherwise they are defined much like \cs{everytlabel}. % \begin{macrocode} \newdef\everymfpic{\afterassignment\@everymfpic\mfp@toks}% \newdef\everyendmfpic{\afterassignment\@everyendmfpic\mfp@toks}% @@ -5185,9 +5239,9 @@ % \DescribeMacro{\xmin} % \DescribeMacro{\xmax} % \DescribeMacro{\ymin} -% \DescribeMacro{\ymax} We make all the arguments of \cs{@mfpic} -% available to the user. Macro \cs{mfp@setconv} now also makes use of -% them. +% \DescribeMacro{\ymax} +% We make all the arguments of \cs{@mfpic} available to the user. Macro +% \cs{mfp@setconv} now also makes use of them. % % We are going to add all text labels to a box \cs{@alltlabels} and put % that whole box on top of the graph during \cs{endmfpic}. @@ -5292,7 +5346,8 @@ % \DescribeMacro{\startbacktext} % \cs{startbacktext}, labels are saved in a special place to be included % behind the \mfpic{} graphic. This continues until -% \DescribeMacro{\stopbacktext}\cs{stopbacktext}. +% \DescribeMacro{\stopbacktext} +% \cs{stopbacktext}. % % We simply turn off \gbc{overlaylabels} and turn on \gbc{backtextlabels} % for \MP{}. We also save the box \cs{@alltlabels} in \cs{@wholegraph} @@ -6281,8 +6336,8 @@ % \DescribeMacro{\mfpverbtex} % This is a user level utility for putting some \mfc{verbatimtex} material % in the output file for \MP. We allow the user to do this even before -% \cs{opengraphsfile} (but only once) by storing it in a token register -% and setting a flag for that command to test. +% \cs{opengraphsfile} by appending it to a token register and setting a +% flag for that command to test. % % We now want \texttt\% signs to be written to the output, but also % want to allow the construct @@ -6314,7 +6369,6 @@ % \begin{macrocode} \newif\ifmfp@verbtex \def\mfp@writetex{% - \endgroup \mfp@ifopengraphsfile {\mfp@ifmpost {\mfcmd{verbatimtex\@nl\the\mfp@toks\@nl\mfp@p\@nl etex}}% @@ -6322,7 +6376,9 @@ \global\mfp@verbtexfalse\global\mfp@verbtex{}}% {\edef\mfp@tempa{\the\mfp@verbtex\the\mfp@toks}% \global\mfp@verbtex\@xp{\mfp@tempa}% - \global\mfp@verbtextrue}}% + \global\mfp@verbtextrue}% + \endgroup +}% % \end{macrocode} % % diff --git a/Master/texmf-dist/source/generic/mfpic/mfpic.ins b/Master/texmf-dist/source/generic/mfpic/mfpic.ins index 120931a31f6..5a528221027 100644 --- a/Master/texmf-dist/source/generic/mfpic/mfpic.ins +++ b/Master/texmf-dist/source/generic/mfpic/mfpic.ins @@ -1,5 +1,5 @@ %%% File: mfpic.ins -%%% A part of mfpic 1.04 2010/03/30 +%%% A part of mfpic 1.05 2010/06/10 %%% \input docstrip \keepsilent @@ -7,7 +7,7 @@ ------------------------------------------------------------------- -Copyright 2002--2009, Daniel H. Luecking +Copyright 2002--2010, Daniel H. Luecking Mfpic may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c of this license or (at diff --git a/Master/texmf-dist/tex/generic/mfpic/mfpic.sty b/Master/texmf-dist/tex/generic/mfpic/mfpic.sty index 54577c9fd10..733961888dc 100644 --- a/Master/texmf-dist/tex/generic/mfpic/mfpic.sty +++ b/Master/texmf-dist/tex/generic/mfpic/mfpic.sty @@ -8,7 +8,7 @@ %% %% ------------------------------------------------------------------- %% -%% Copyright 2002--2009, Daniel H. Luecking +%% Copyright 2002--2010, Daniel H. Luecking %% %% Mfpic may be distributed and/or modified under the conditions of the %% LaTeX Project Public License, either version 1.3c of this license or (at @@ -22,10 +22,10 @@ %% with mfpic: plain TeX, LaTeX, plain Metafont and plain MetaPost. %% %%% File: mfpic.dtx -%%% A part of mfpic 1.04 2010/03/30 +%%% A part of mfpic 1.05 2010/06/10 %%% \ProvidesPackage{mfpic} - [2010/03/30 v1.04. Macros for drawing with Metafont/MetaPost.]% + [2010/06/10 v1.05. Macros for drawing with Metafont/MetaPost.]% \DeclareOption{draft}{\mfpicdraft}% \DeclareOption{final}{% \mfpicfinal\PassOptionsToPackage{final}{graphics}}% diff --git a/Master/texmf-dist/tex/generic/mfpic/mfpic.tex b/Master/texmf-dist/tex/generic/mfpic/mfpic.tex index cc2e0f27e3b..fc6efa8e1cc 100644 --- a/Master/texmf-dist/tex/generic/mfpic/mfpic.tex +++ b/Master/texmf-dist/tex/generic/mfpic/mfpic.tex @@ -8,7 +8,7 @@ %% %% ------------------------------------------------------------------- %% -%% Copyright 2002--2009, Daniel H. Luecking +%% Copyright 2002--2010, Daniel H. Luecking %% %% Mfpic may be distributed and/or modified under the conditions of the %% LaTeX Project Public License, either version 1.3c of this license or (at @@ -22,14 +22,14 @@ %% with mfpic: plain TeX, LaTeX, plain Metafont and plain MetaPost. %% %%% File: mfpic.dtx -%%% A part of mfpic 1.04 2010/03/30 +%%% A part of mfpic 1.05 2010/06/10 %%% \ifx\mfpfileversion\UndEfInEd\else\expandafter\endinput\fi% {% \catcode\lq\.12 \catcode\lq\/12% - \gdef\mfpfileversion{1.04}% - \gdef\mfpfiledate{2010/03/30}% - \gdef\mfpicversion{104}% + \gdef\mfpfileversion{1.05}% + \gdef\mfpfiledate{2010/06/10}% + \gdef\mfpicversion{105}% }% \let\mfpsaveplus\+% \let\+\tabalign% @@ -1743,7 +1743,6 @@ \afterassignment\mfp@writetex\global\mfp@toks}% \newif\ifmfp@verbtex \def\mfp@writetex{% - \endgroup \mfp@ifopengraphsfile {\mfp@ifmpost {\mfcmd{verbatimtex\@nl\the\mfp@toks\@nl\mfp@p\@nl etex}}% @@ -1751,7 +1750,9 @@ \global\mfp@verbtexfalse\global\mfp@verbtex{}}% {\edef\mfp@tempa{\the\mfp@verbtex\the\mfp@toks}% \global\mfp@verbtex\@xp{\mfp@tempa}% - \global\mfp@verbtextrue}}% + \global\mfp@verbtextrue}% + \endgroup +}% \mfpicnumber{1}% \InputIfFileExists{mfppatch.tex}{}{}% \mfp@ifdefined\mfpdraftfont{}{\newdef\mfpdraftfont{\tt}}% diff --git a/Master/texmf-dist/tex/generic/mfpic/mfppatch.tex b/Master/texmf-dist/tex/generic/mfpic/mfppatch.tex index 64b8d7bda31..f11c19525ed 100644 --- a/Master/texmf-dist/tex/generic/mfpic/mfppatch.tex +++ b/Master/texmf-dist/tex/generic/mfpic/mfppatch.tex @@ -1,7 +1,7 @@ %%% File: mfppatch.tex -%%% A part of mfpic 1.04 2010/03/30 +%%% A part of mfpic 1.05 2010/06/10 %%% -\def\mfp@versionpatched{1.04}% +\def\mfp@versionpatched{1.05}% \def\mfp@patchinfo{% \Mfpic@warn{This patch is only for mfpic version \mfp@versionpatched!\@nl}}% \let\mfp@dopatches\endinput diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index 780bc41ecc8..8c3a1ea0089 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -423,6 +423,7 @@ $Master = "$mydir/../.."; 'metaobj', "&MAKEflatten", 'metauml', "&MAKEmetauml", 'mflogo', "die 'skipping, TL conflates distinct mflogo pkgs on CTAN'", + 'mfpic', "&MAKEcopy", 'miniltx', "die 'skipping, use graphics-pln'", 'minionpro', "die 'skipping, requires nonfree minion'", 'misc', "&MAKEmisc", -- cgit v1.2.3