summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/luatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-10-21 20:21:59 +0000
committerKarl Berry <karl@freefriends.org>2023-10-21 20:21:59 +0000
commitc6e65df65e2730ccbc12241e001490436adb1c4b (patch)
treecb0735c7c550e7705a57e14190f1e1874b8a8eaf /Master/texmf-dist/doc/luatex
parent50f4b1959975e845dab6db7bc010decc6ef24673 (diff)
minim all (21oct23)
git-svn-id: svn://tug.org/texlive/trunk@68612 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/luatex')
-rw-r--r--Master/texmf-dist/doc/luatex/minim-math/README6
-rw-r--r--Master/texmf-dist/doc/luatex/minim-math/minim-math.doc4
-rw-r--r--Master/texmf-dist/doc/luatex/minim-math/minim-math.pdfbin111554 -> 112093 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/minim-mp/README15
-rw-r--r--Master/texmf-dist/doc/luatex/minim-mp/minim-mp.doc80
-rw-r--r--Master/texmf-dist/doc/luatex/minim-mp/minim-mp.pdfbin98659 -> 109855 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/minim-pdf/README11
-rw-r--r--Master/texmf-dist/doc/luatex/minim-pdf/minim-pdf.doc79
-rw-r--r--Master/texmf-dist/doc/luatex/minim-pdf/minim-pdf.pdfbin111274 -> 116670 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/minim/README6
-rw-r--r--Master/texmf-dist/doc/luatex/minim/minim.doc4
-rw-r--r--Master/texmf-dist/doc/luatex/minim/minim.pdfbin321641 -> 338726 bytes
12 files changed, 167 insertions, 38 deletions
diff --git a/Master/texmf-dist/doc/luatex/minim-math/README b/Master/texmf-dist/doc/luatex/minim-math/README
index e6f44401e2f..bb7786d6cbf 100644
--- a/Master/texmf-dist/doc/luatex/minim-math/README
+++ b/Master/texmf-dist/doc/luatex/minim-math/README
@@ -1,4 +1,4 @@
-Version: 2023/1.2
+Version: 2023/1.3
SUMMARY
@@ -18,6 +18,10 @@ In order to obtain the typeset manual of this package, simply say:
HISTORY
+2023/1.3 (20/10/2023)
+
+ No notable changes.
+
2023/1.2 (1/1/2023)
Minor additions:
diff --git a/Master/texmf-dist/doc/luatex/minim-math/minim-math.doc b/Master/texmf-dist/doc/luatex/minim-math/minim-math.doc
index d458876b41e..2a44dc72f49 100644
--- a/Master/texmf-dist/doc/luatex/minim-math/minim-math.doc
+++ b/Master/texmf-dist/doc/luatex/minim-math/minim-math.doc
@@ -8,8 +8,8 @@
\else \startmetadata
author {Esger Renkema}
title {minim-math}
- date {2023-03-03}
- version {2023/1.2}
+ date {2023-10-20}
+ version {2023/1.3}
keywords {LuaTeX; Plain TeX; Unicode mathematics}
stopmetadata
\maketitle \fi
diff --git a/Master/texmf-dist/doc/luatex/minim-math/minim-math.pdf b/Master/texmf-dist/doc/luatex/minim-math/minim-math.pdf
index 6a80c7a07e8..30e2129fcf5 100644
--- a/Master/texmf-dist/doc/luatex/minim-math/minim-math.pdf
+++ b/Master/texmf-dist/doc/luatex/minim-math/minim-math.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/minim-mp/README b/Master/texmf-dist/doc/luatex/minim-mp/README
index b28f8c42673..d712a7f11ca 100644
--- a/Master/texmf-dist/doc/luatex/minim-mp/README
+++ b/Master/texmf-dist/doc/luatex/minim-mp/README
@@ -1,4 +1,4 @@
-Version: 2023/1.2
+Version: 2023/1.3
SUMMARY
@@ -19,11 +19,24 @@ In order to obtain the typeset manual of this package, simply say:
HISTORY
+2023/1.3 (20/10/2023)
+
+ * Various runscript improvements:
+ - Supplement runscript environment with runscript-specific functions.
+ - Provide an escape hatch for passing raw strings to lua.
+ - Add helper macros and functions for safely passing values between
+ metapost and lua.
+ * File i/o from metapost code is now included in the --recorder output.
+ * Improve font handling in minim-lamp.ini, and provide \begin{document}.
+ * Add a minim-mp.sty package file for LaTeX users.
+
+
2023/1.2 (3/3/2023)
* Add a few more metapost macros.
* Various small bug fixes.
+
2022/1.1 (3/3/2022)
New features:
diff --git a/Master/texmf-dist/doc/luatex/minim-mp/minim-mp.doc b/Master/texmf-dist/doc/luatex/minim-mp/minim-mp.doc
index af84cd15811..2f7541ba759 100644
--- a/Master/texmf-dist/doc/luatex/minim-mp/minim-mp.doc
+++ b/Master/texmf-dist/doc/luatex/minim-mp/minim-mp.doc
@@ -8,8 +8,8 @@
\else \startmetadata
author {Esger Renkema}
title {minim-mp}
- date {2023-03-03}
- version {2023/1.2}
+ date {2023-10-20}
+ version {2023/1.3}
keywords {LuaTeX; Plain TeX; MetaPost; mplib}
stopmetadata
\maketitle \fi
@@ -32,14 +32,34 @@ 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.
+\section As a stand-alone Metapost compiler % 1
+
This package can also be used as a stand-alone metapost compiler. Saying
\stopformulatagging$$\hbox{⟦luatex --fmt=minim-mp your_file.mp⟧}$$\startformulatagging
will create a pdf file of all images in ⟦your_file.mp⟧, in order, with page
sizes adjusted to image dimensions. You might need generate the format first,
this is done with
\stopformulatagging$$\hbox{⟦luatex --ini minim-mp.ini⟧}$$\startformulatagging
-Use minim-lamp instead of minim-mp for an experimental latex-based version
-of the minim-mp format.
+Use minim-lamp instead of minim-mp for a latex-based version of the minim-mp
+format.
+With minim-lamp, for specifying the contents of the preamble, you can use
+⟦verbatimtex ... etex;⟧ statements at the top of your file.
+Concluding the preamble with ⟦\begin{document}⟧ is optional, as both ⟦\begin⟧
+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
+alternative to ⟦\directmetapost⟧.
+
+The ⟦metapost⟧ environment has no persistent backing instance.
+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.
+
\section Metapost instances % 1
@@ -81,6 +101,7 @@ tex can parse as a number.
– Puts the image named ⟦name⟧ in box ⟦box-nr⟧.
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
to the current list.
@@ -111,6 +132,7 @@ a (numerical) font~id or the (cs)name of a font (without backslash).
One possible use of the ⟦infont⟧ operator is setting text along curves:
+\nobreak
⟦beginfig(1)
save t, w, r, a; picture t;
t = "Running TeX from within MetaPost" infont "tenrm";
@@ -138,7 +160,11 @@ beginfig(1)
endfor
endfig;}\starttagging \stopelement{Figure}
-For the greatest amount of control, however, you will need the ⟦*glyph g of f⟧
+By default, the ⟦maketext⟧ operator is used for typesetting labels. You can,
+however, order de ⟦label⟧ macro to use ⟦infont⟧ instead by setting
+⟦*maketextlabels⟧ to ⟦false⟧.
+
+For the greatest amount of control, you can use the ⟦*glyph g of f⟧
operator, which returns the contours that make up a glyph. It is a bit more
versatile than its traditional metapost counterpart: ⟦g⟧ may also be the name
of the glyph instead of its index, while ⟦f⟧ can be a font~id or font name (as
@@ -191,6 +217,17 @@ metapost instance carries around its own lua environment so that assignments
you make are local to the instance. (You can of course order the global
environment to be used by giving ⟦env = _G⟧ as option to
⟦\newmetapostinstance⟧.)
+Any environment you specify will be supplemented with the contents of the
+⟦*M.mp_functions⟧ table. It currently contains two functions: ⟦quote(s)⟧, which
+escapes all double quotes in the string ⟦s⟧ before surrounding it with the same
+(so that it may be read as a metapost string literal); and ⟦sp_to_pt(nr)⟧,
+which prints dimensions in points (preventing overflows).
+
+When using ⟦runscript⟧ in this way, you must ensure its argument is a correct
+lua program. As an escape hatch, raw strings can be passed to lua with
+⟦runscript ("[[function_name]]" & raw_string)⟧.
+This will return the result of the function ⟦function_name⟧ applied to
+⟦raw_string⟧ as a lua string.
If your lua snippet returns nothing, the ⟦runscript⟧ call will be invisible to
metapost. If on the other hand it does return a value, that value will have to
@@ -199,6 +236,9 @@ be translated to metapost. Numbers and strings will be returned as they are
a metapost string). You can return a point or colour by returning an array of
two to four elements. For other return values, ⟦tostring()⟧ will be called.
+
+\section Passing values to lua
+
Do keep in mind that metapost and lua represent numbers in different ways and
that rounding errors may occur. For instance, metapost’s ⟦decimal epsilon⟧
returns ⟦0.00002⟧, which metapost understands as ⟦1/65536⟧, but lua as
@@ -210,10 +250,38 @@ than tex, so that ⟦epsilon⟧ when taken as a dimension is not quite equal to
⟦1sp⟧. Use the metapost macro ⟦*scaledpoints⟧ for passing to lua a metapost
dimension as an integral number of scaled points.
+Strings can be passed to lua with the ⟦*lua_string⟧ macro, which escapes the
+necessary characters and then surrounds its argument with quotes.
+A generic macro for passing values to lua, finally, is ⟦*quote_for_lua⟧, which
+automatically converts strings, numbers, points and colours to (metapost)
+strings that lua can understand.
+
+
+\section Querying tex and lua variables
+
+Stitching together lua snippets by hand is not very convenient. Therefore,
+minim-mp provides three helper macros that should cover most lua interaction.
+For running a single lua function, ⟦*luafunction⟧ ⟦<suffix> (<arguments>)⟧
+returns the result of the function ⟦str <suffix>⟧ applied to any number of
+arguments, which are quoted automatically.
+Variables can be queried with ⟦*luavariable⟧ ⟦<suffix>⟧
+and set with ⟦*setluavariable⟧ ⟦<suffix> = <value>;⟧.
+
+The details of metapost tokenisation make these macros rather powerful: you can
+not only say e.g. ⟦luavariable tex.jobname⟧ to get the current jobname, but
+even define a ⟦texvariable⟧ macro with
+\stopformulatagging$$\hbox{⟦vardef texvariable @# = luavariable tex @# enddef;⟧}$$\startformulatagging
+and have ⟦texvariable jobname⟧ work as expected.
+
+For accessing count, dimen, attribute or toks registers, the macros are
+⟦*tex.count⟧ ⟦[number]⟧ or ⟦*tex.count⟧⟦.name⟧ [etc. etc.] for getting and
+⟦*set tex.count⟧ ⟦[number] = value⟧ or ⟦*tex.count⟧⟦.name = value⟧ etc. for
+setting values.
+
\section Tiling patterns % 1
-The ⟦*withpattern(<name>)⟧ added to a ⟦fill⟧ statement will fill the path with
+The condition ⟦*withpattern(<name>)⟧ added to a ⟦fill⟧ statement will fill the path with
a pattern instead of a solid colour. If the patterns contains no colour
information of itself, it will have the colour given by ⟦withcolor⟧.
Stroking operations (the ⟦draw⟧ part) will not be affected.
diff --git a/Master/texmf-dist/doc/luatex/minim-mp/minim-mp.pdf b/Master/texmf-dist/doc/luatex/minim-mp/minim-mp.pdf
index 15ada22b367..aa64541ffe4 100644
--- a/Master/texmf-dist/doc/luatex/minim-mp/minim-mp.pdf
+++ b/Master/texmf-dist/doc/luatex/minim-mp/minim-mp.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/minim-pdf/README b/Master/texmf-dist/doc/luatex/minim-pdf/README
index cff08578237..eb9a1bd114b 100644
--- a/Master/texmf-dist/doc/luatex/minim-pdf/README
+++ b/Master/texmf-dist/doc/luatex/minim-pdf/README
@@ -1,4 +1,4 @@
-Version: 2023/1.2
+Version: 2023/1.3
SUMMARY
@@ -27,6 +27,14 @@ In order to obtain the typeset manual of this package, simply say:
HISTORY
+2023/1.3 (20/10/2023)
+
+ New features:
+
+ * Add \markcolumnspan and \markrowspan
+ * Add \markcolumnhead and \markrowhead
+
+
2023/1.2 (3/3/2023)
Breaking changes:
@@ -38,6 +46,7 @@ HISTORY
* Support the use of an IDTree in the document structure.
* Add \tagattribute, \settagid and \showstructure.
+
2022/1.1 (3/3/2022)
New features:
diff --git a/Master/texmf-dist/doc/luatex/minim-pdf/minim-pdf.doc b/Master/texmf-dist/doc/luatex/minim-pdf/minim-pdf.doc
index 3030378bcb9..e04deb31abc 100644
--- a/Master/texmf-dist/doc/luatex/minim-pdf/minim-pdf.doc
+++ b/Master/texmf-dist/doc/luatex/minim-pdf/minim-pdf.doc
@@ -14,8 +14,8 @@ all other features of the package are described here.
\else \startmetadata
author {Esger Renkema}
title {minim-pdf}
- date {2023-03-03}
- version {2023/1.2}
+ date {2023-10-20}
+ version {2023/1.3}
keywords {LuaTeX; Plain TeX; PDF/A; Tagged PDF; accessibility; a11y;
hypertext; bookmarks; document outline; associated files}
stopmetadata
@@ -392,12 +392,38 @@ This package ensures the existence of the ⟦nohyph⟧, ⟦nolang⟧, ⟦uncoded
⟦undetermined⟧ dummy languages, all without hyphenation.
-\section Helper macros % 1
+\section Mathematics % 1
-For marking up an entry in a table of contents, you can use the macro
-⟦*\marktocentry {dest} {lbl} {title} {filler} {pageno}⟧, which should insert all
-tags in the correct way. (The ⟦dest⟧ is a link destination and can be empty;
-the ⟦lbl⟧ is a section number and can also be empty.)
+You can auto-tag equations as formulas by specifing ⟦*\autotagformulas⟧.
+After this command, auto-tagging can be switched off and on with
+⟦*\stopformulatagging⟧ and ⟦*\startformulatagging⟧.
+Auto-tagging formulas is dangerous, because sometimes equations are used for
+lay-out and should not be marked as such.
+It is also somewhat fragile, as it requires equations to end with dollar
+signs (and not with ⟦\Ustopmath⟧ or ⟦\Ustopdisplaymath⟧).
+
+The tex source of an equation can be associated with the ⟦Formula⟧ structure
+element in various ways, which can be configured with ⟦*\includeformulasources
+{options}⟧, where the ⟦options⟧ must be a comma-separated list of
+⟦alttext⟧, ⟦actualtext⟧ or ⟦attachment⟧.
+The ⟦alttext⟧ and ⟦actualtext⟧ option will set the ⟦/Alt⟧ or ⟦/ActualText⟧
+attributes to the unexpanded source code of the equation, surrounded by the
+appropriate number of dollar signs.
+The ⟦attachment⟧ option attaches the source of the formula as an embedded file
+with its ⟦/AFRelation⟧ set to ⟦Source⟧;
+this will only work if ⟦\pdfaconformancelevel⟧ equals three.
+The name of this file can be changed by redefining ⟦*\formulafilename⟧ inside
+the equation.
+The default value is ⟦{actualtext,attachment}⟧.
+
+Note that the contents of the equation will be expanded fully (as in ⟦\xdef⟧)
+before their inclusion as the equation source. This may place restrictions on
+the macros you want to use (those in minim-math should be safe).
+Any occurrence of ⟦\alttext⟧ or ⟦\actualtext⟧ overrides the
+automatically-assigned value and will be stripped from the equation source.
+
+
+\section Tables % 1
For marking up tables, a whole array of helper macros is available. First,
⟦*\marktable⟧ should be given \emph{before} the ⟦\halign⟧.
@@ -416,24 +442,29 @@ If you use a table for typesetting a list, you can use ⟦*\marktableaslist⟧
instead, which marks the first column as list label and the second column as
list item. Of course, this only works with two-column tables.
-Finally, you can auto-tag equations as formulas by specifing
-⟦*\autotagformulas⟧. This is especially dangerous, because sometimes equations
-are used for lay-out and should not be marked as such.
-After the latter command, auto-tagging can be switched off and on with
-⟦*\stopformulatagging⟧ and ⟦*\startformulatagging⟧.
+Cells spanning multiple cells or rows can be marked with
+⟦*\markcolumnspan {width}⟧ and ⟦*\markrowspan {height}⟧; these statements may not
+occur before ⟦\marktablecell⟧. Note that while ⟦\markcolumnspan⟧ properly
+increases the (internal) column number, ⟦\markcolumnrow⟧ does nothing of the
+sort (and indeed, no general logic can be given in the latter case). Always proceed
+with caution when using cells spanning multiple rows, and inspect the resulting
+structure carefully.
+
+Marking a table header (either manually or with ⟦\automarktable⟧) will not
+connect normal cells with their headers; you will have to connect these
+manually by including ⟦*\markcolumnhead⟧ or ⟦*\markrowhead⟧ in the appropriate
+header cells. This must be done \emph{after} ⟦\markcolumnspan⟧ if the latter
+appplies. If properly setup like this, other cells of the table (including
+header cells) will be assigned to matching row or column headers automatically.
+
+
+\section Other helper macros % 1
+
+For marking up an entry in a table of contents, you can use the macro
+⟦*\marktocentry {dest} {lbl} {title} {filler} {pageno}⟧, which should insert all
+tags in the correct way. (The ⟦dest⟧ is a link destination and can be empty;
+the ⟦lbl⟧ is a section number and can also be empty.)
-The source of the equation can be associated with the ⟦Formula⟧ structure
-element in various ways, which can be configured with ⟦*\includeformulasources
-{option}⟧, where the ⟦option⟧ must be one of ⟦none⟧, ⟦actualtext⟧, ⟦attachment⟧
-or ⟦both⟧.
-The ⟦actualtext⟧ option will use the unexpanded source code of the equation,
-surrounded by the appropriate number of dollar signs.
-The ⟦attachment⟧ option will only work if ⟦\pdfaconformancelevel⟧ equals three:
-then the source of the formula will be attached in an embedded file with the
-⟦/AFRelation⟧ set to ⟦Source⟧.
-The name of this file can be changed by redefining ⟦*\formulafilename⟧ inside
-the equation.
-The default value is ⟦both⟧.
% 
diff --git a/Master/texmf-dist/doc/luatex/minim-pdf/minim-pdf.pdf b/Master/texmf-dist/doc/luatex/minim-pdf/minim-pdf.pdf
index 39500a7985b..a6e22ee194a 100644
--- a/Master/texmf-dist/doc/luatex/minim-pdf/minim-pdf.pdf
+++ b/Master/texmf-dist/doc/luatex/minim-pdf/minim-pdf.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/minim/README b/Master/texmf-dist/doc/luatex/minim/README
index 2114fa4fb44..36fe201f7c9 100644
--- a/Master/texmf-dist/doc/luatex/minim/README
+++ b/Master/texmf-dist/doc/luatex/minim/README
@@ -1,4 +1,4 @@
-Version: 2023/1.2
+Version: 2023/1.3
SUMMARY
@@ -31,6 +31,10 @@ the packages mentioned above.
HISTORY
+2023/1.3 (20/10/2023)
+
+ No changes.
+
2023/1.2 (3/3/2023)
* Added \Ucharcat, as in XeTeX.
diff --git a/Master/texmf-dist/doc/luatex/minim/minim.doc b/Master/texmf-dist/doc/luatex/minim/minim.doc
index 7061917398d..bf56d897478 100644
--- a/Master/texmf-dist/doc/luatex/minim/minim.doc
+++ b/Master/texmf-dist/doc/luatex/minim/minim.doc
@@ -4,8 +4,8 @@
\startmetadata
author {Esger Renkema}
title {minim}
- date {2023-03-03}
- version {2023/1.2}
+ date {2023-10-20}
+ version {2023/1.3}
keywords {LuaTeX; Plain TeX; MetaPost; PDF/A; Tagged PDF; accessibility; a11y;
Unicode mathematics; XMP; metadata; hypertext; bookmarks}
stopmetadata
diff --git a/Master/texmf-dist/doc/luatex/minim/minim.pdf b/Master/texmf-dist/doc/luatex/minim/minim.pdf
index 3685ecf7fdb..b6e05b6cc81 100644
--- a/Master/texmf-dist/doc/luatex/minim/minim.pdf
+++ b/Master/texmf-dist/doc/luatex/minim/minim.pdf
Binary files differ