diff options
author | Norbert Preining <norbert@preining.info> | 2024-03-02 03:04:21 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2024-03-02 03:04:21 +0000 |
commit | b7323fe884f378851ee661babaa5bd644271f348 (patch) | |
tree | 8891732393826e5c5893d00fa39cf9a5eb0a3a90 /macros/luatex/generic/minim-mp/minim-mp.doc | |
parent | 19a826b6e3a0d2ea6bbd1bf733a8e590463275ed (diff) |
CTAN sync 202403020304
Diffstat (limited to 'macros/luatex/generic/minim-mp/minim-mp.doc')
-rw-r--r-- | macros/luatex/generic/minim-mp/minim-mp.doc | 43 |
1 files changed, 29 insertions, 14 deletions
diff --git a/macros/luatex/generic/minim-mp/minim-mp.doc b/macros/luatex/generic/minim-mp/minim-mp.doc index 9429544d8e..0cd4ff574e 100644 --- a/macros/luatex/generic/minim-mp/minim-mp.doc +++ b/macros/luatex/generic/minim-mp/minim-mp.doc @@ -8,8 +8,8 @@ \else \startmetadata author {Esger Renkema} title {minim-mp} - date {2024-01-05} - version {2024/1.4} + date {2024-02-25} + version {2024/1.5} keywords {LuaTeX; Plain TeX; MetaPost; mplib} stopmetadata \maketitle \fi @@ -29,8 +29,8 @@ a persistent metapost instance. This will also give you more control over image extraction. See below under „Metapost instances”. The ⟦options⟧ will also be explained there (for simple cases, you will not need them). -The logging of the metapost run will be included in the regular log file. If an -error occurs, the logging will also be shown on the terminal. +The logs of the metapost run will be included in the regular log file. If an +error occurs, the log of the last snippet will also be shown on the terminal. \section As a stand-alone Metapost compiler %1 @@ -49,16 +49,26 @@ and ⟦\end{document}⟧ will be inserted automatically if omitted. \section LaTeX compatibility %1 -An experimental latex package is included in ⟦minim-mp.sty⟧. It accepts no -options, as it really is a rather thin wrapper around the plain tex package. -It does, however, provide a proper ⟦*metapost⟧ latex environment as an +An experimental latex package is included in ⟦minim-mp.sty⟧. It really is +a rather thin wrapper around the plain tex package, +but does provide a proper ⟦*metapost⟧ latex environment as an alternative to ⟦\directmetapost⟧. - -The ⟦metapost⟧ environment has no persistent backing instance. -You can create a similar environment ⟦envname⟧ that does with +The ⟦metapost⟧ environment has no persistent backing instance, +but you can create a similar environment ⟦envname⟧ that does with ⟦*\newmetapostenvironment [options] {envname}⟧. If your demands are even more complex, you should fall back to the plain tex -commands described below. +commands described in the next section. + +As in luamplib, you can use ⟦*\mpcolor {name}⟧ to insert the proper colour +values; this macro is only available inside the above environments. + +When the package is loaded with the option ⟦luamplib⟧, minim-mp will try and +act as a drop-in replacement for luamplib. The effort made is not very great +though, but it will define an ⟦mplibcode⟧ environment, as well as the +⟦\mplibcodeinherit⟧, ⟦\mplibshowlog⟧, ⟦\mplibsetformat⟧ and +⟦\mplibnumbersystem⟧ switches. +Please do note that this is not the recommended way of using minim-mp, which +remains the interface documented in the next section. \section Metapost instances %1 @@ -73,7 +83,7 @@ These are the options you can use: Option&Default&Description\cr ⟦jobname⟧&⟦':metapost:'⟧&Used in error messages.\cr ⟦format⟧&⟦'plain.mp'⟧&Format to initialise the instance with.\cr -⟦math⟧&⟦'scaled'⟧&One of ⟦scaled⟧, ⟦decimal⟧ or ⟦double⟧.\cr +⟦mathmode⟧&⟦'scaled'⟧&One of ⟦scaled⟧, ⟦decimal⟧ or ⟦double⟧.\cr ⟦seed⟧&⟦nil⟧&Random seed for this instance.\cr ⟦catcodes⟧&⟦0⟧&Catcode table for ⟦btex ... etex⟧.\cr ⟦env⟧© of ⟦_G⟧&Lua environment; see below.\cr @@ -103,7 +113,7 @@ tex can parse as a number. Say ⟦*\remainingmpimages \id⟧ for the number of images not yet retrieved. Finally, as a shorthand, ⟦*\runmetapostimage \id { code }⟧ will add -⟦beginfig ... endfig⟧ to your ⟦code⟧ and write the resulting image immediately +⟦beginfig ... endfig;⟧ to your ⟦code⟧ and write the resulting image immediately to the current list. @@ -364,7 +374,7 @@ A transparency group is a special kind of XForm, and these can be created from withing metapost: ⟦<id> =⟧ ⟦*saveboxresource (<attributes>) <picture>⟧ returns a number identifying the resource and can be fed attributes in the same way as ⟦setgstate⟧. XForms defined through metapost are available to other metapost -instances, but not to tex, though the macro painting them, ⟦*boxresource <id>⟧, +instances but not to tex, though the macro painting them, ⟦*boxresource <id>⟧, also accepts identifiers of tex-defined box resources. There remains a subtle difference, however: metapost-defined box resources are placed at their original origin. @@ -429,6 +439,11 @@ Each metapost instance is a table containing the following entries: ⟦catcodes⟧&Number of the catcode table used with ⟦btex ... etex⟧.\cr ⟦env⟧&The lua environment for ⟦runscript⟧.\cr} +Default values for the format and number system are available in the +⟦M.default_format⟧ and ⟦M.default_mathmode⟧ variables, +while ⟦M.on_line⟧ controls whether the logs are always printed to the +terminal. + \section Debugging %1 |