diff options
author | Karl Berry <karl@freefriends.org> | 2022-03-04 22:04:55 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-03-04 22:04:55 +0000 |
commit | f4b65fd65868a9f68c17fa969bd5533b8c81af68 (patch) | |
tree | 20f68ebb5713403ef628f48ec4c41090013df5bc /Master/texmf-dist/doc/luatex | |
parent | 2af24efcc003674f1cb52ea3284357faf60540f1 (diff) |
minim* (4mar22)
git-svn-id: svn://tug.org/texlive/trunk@62419 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/luatex')
16 files changed, 380 insertions, 139 deletions
diff --git a/Master/texmf-dist/doc/luatex/minim-math/README b/Master/texmf-dist/doc/luatex/minim-math/README index b463a8bad3a..2463570ef86 100644 --- a/Master/texmf-dist/doc/luatex/minim-math/README +++ b/Master/texmf-dist/doc/luatex/minim-math/README @@ -1,4 +1,4 @@ -Version: 2021/1.0 +Version: 2022/1.1 SUMMARY @@ -16,9 +16,22 @@ In order to obtain the typeset manual of this package, simply say: luatex minim-math.doc +HISTORY + +2022/1.1 (1/1/2022) + + Minor changes: + + * Made \setminus refer to the proper symbol. + +2021/1.0 (1/6/2021) + + This was the original release. + + COPYING -(c) 2021 Esger Renkema +(c) 2022 Esger Renkema These files may be distributed under the terms of the European Union Public Licence (EUPL) version 1.2 or later. A copy can be obtained at: 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 a176c9b1d03..79ff1dee718 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 {2021-06-01} - version {2021/1.0} + date {2022-03-03} + version {2022/1.1} keywords {LuaTeX; Plain TeX; Unicode mathematics} stopmetadata \maketitle \fi @@ -49,7 +49,7 @@ Shorthand\quad\strut & Value of ⟦style⟧\quad\strut & Result \cr Styles without shorthand are ⟦sans⟧/⟦sf⟧, ⟦sfit⟧, ⟦sfbf⟧, ⟦sfbfit⟧, ⟦tt⟧/⟦mono⟧ and finally the special value ⟦*clear⟧ for using the default style. You can use the shorthands directly in sub- and superscripts: ⟦v^\scr F⟧ will -result in $v^\scr F$. +result in $v^\scr F$\kern-4pt. While math families are not used anymore for switching between styles (see below), you still can use ⟦\fam⟧ with the values 0, 1, 2, 4, 5, 6 or~7 for @@ -135,11 +135,11 @@ this has been made so with ⟦*\mathdef ħ {\hbar}⟧ (you could also have said The minimum you need do to set up a mathematical font is this: ⟦*\font\tenmath - {Latin Modern Math:mode=base;script=math;ssty=0} at 10pt + {Latin Modern Math:mode=base;script=math;ssty=0;} at 10pt \font\tenmaths - {Latin Modern Math:mode=base;script=math;ssty=1} at 7pt + {Latin Modern Math:mode=base;script=math;ssty=1;} at 7pt \font\tenmathss - {Latin Modern Math:mode=base;script=math;ssty=2} at 5pt + {Latin Modern Math:mode=base;script=math;ssty=2;} at 5pt \textfont 0 = \tenmath \scriptfont 0 = \tenmaths \scriptscriptfont 0 = \tenmathss⟧ @@ -159,6 +159,10 @@ family ⟦*\accentfam⟧, ⟦*\radicalfam⟧ and ⟦*\extensiblefam⟧ that control the family of all accents, radicals and extensibles. +Do note that various spacing constants are set according to the \emph{last} +math family that is assigned to. Therefore, you should assign your main math +font to a family after all others. + \section Shorthands and additions diff --git a/Master/texmf-dist/doc/luatex/minim-math/minim-math.pdf b/Master/texmf-dist/doc/luatex/minim-math/minim-math.pdf Binary files differindex b5269815dc2..33e9aec9f6c 100644 --- a/Master/texmf-dist/doc/luatex/minim-math/minim-math.pdf +++ b/Master/texmf-dist/doc/luatex/minim-math/minim-math.pdf diff --git a/Master/texmf-dist/doc/luatex/minim-mp/README b/Master/texmf-dist/doc/luatex/minim-mp/README index dee13d1bfe3..2e04ee1050f 100644 --- a/Master/texmf-dist/doc/luatex/minim-mp/README +++ b/Master/texmf-dist/doc/luatex/minim-mp/README @@ -1,4 +1,4 @@ -Version: 2021/1.0 +Version: 2022/1.1 SUMMARY @@ -17,9 +17,37 @@ In order to obtain the typeset manual of this package, simply say: luatex minim-mp.doc +HISTORY + +2022/1.1 (3/3/2022) + + New features: + + * Made instance initialisation more flexible; this replaces M.init_files + with M.init_code (see manual). + * Add support for the glyph of operator. + * Add support for the even-odd rule of filling and noncontinuous paths. + * Add experimental latex support (the minim-lamp format). + * Make minim-mp compatible with tikz/pgf. + * Expand the plain macro set slightly. + + Minor changes: + + * Improved display of metapost logs. + * Redefine units to fit other numerical engines better. + * Fixed a bug in pattern generation that prevented simplifying patterns + into raw pdf code. + * No longer write out superfluous line widths. + + +2021/1.0 (1/6/2021) + + This was the original release. + + COPYING -(c) 2021 Esger Renkema +(c) 2022 Esger Renkema, Michal Vlasák These files may be distributed under the terms of the European Union Public Licence (EUPL) version 1.2 or later. A copy can be obtained at: 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 788d26b6a0e..b7fb47f4163 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 {2021-06-01} - version {2021/1.0} + date {2022-03-03} + version {2022/1.1} keywords {LuaTeX; Plain TeX; MetaPost; mplib} stopmetadata \maketitle \fi @@ -35,7 +35,11 @@ error occurs, the logging will also be shown on the terminal. 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. +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. \section Metapost instances %1 @@ -95,10 +99,15 @@ Arbitrary tex statements may be included in ⟦*verbatimtex ... etex⟧, which m occur anywhere. These ⟦btex⟧ and ⟦verbatimtex⟧ statements are executed in the order they are given. +Previously-defined box resources can be included with ⟦*boxresource(nr)⟧. The +result will be an image object with the proper dimensions. This image can be +transformed in any way you like, but you cannot inspect the contents of the +resource within metapost. + You can also use metapost’s ⟦*infont⟧ operator, which restricts the text to-be-typeset to a single font, but returns an ⟦picture⟧ containing a ⟦picture⟧ for each character. The right-hand argument of ⟦infont⟧ should either be -a (numerical) font id or the (cs)name of a font. +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: @@ -129,6 +138,52 @@ beginfig(1) endfor endfig;}\starttagging \stopelement{Figure} +For the greatest amount of control, however, you will need 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 +with ⟦infont⟧). + +A variant of ⟦glyph of⟧ is the ⟦*contours t of f⟧ macro: it first typesets the +string ⟦t⟧ in the same way as ⟦infont⟧ does (so that kerning and font shaping +are applied), but returns a (comma-separated) list of contours, such as may be +used in a ⟦for⟧ loop. Due to rounding errors, the glyphs will not match exactly. + +Be aware that the contours returned by these operators may be disjoint: +a letter ⟦o⟧, for example, will consists of two. This means you cannot recreate +the characters by just filling each contour: this would turn the ⟦o⟧ into +a filled-in circle. Instead, you must use ⟦multifill⟧ on the entire output of +⟦glyph of⟧ or ⟦contours of⟧ (see the next section). + + +\section Partial paths and the even-odd rule %1 + +You can fill or draw two or more disjoint paths in one go by using ⟦*nofill⟧ as +drawing operator for all paths but the last. This may make it easier to cut +something out of a shape, since you do not have to worry about stitching the +paths together. + +While metapost fills paths according to the winding number, the pdf format also +supports filling according to the even-odd rule. This has been made possible +with the ⟦*eofill⟧ and ⟦*eofilldraw⟧ drawing statements, which can of course +also be used as the final statement after a series of nofills. + +The macros ⟦*multi(draw|fill|filldraw|eofill|eofilldraw)⟧ take a list of paths +between parentheses and can be followed by the usual drawing options. +For example, +⟦multidraw (contours "example" of "tenbf") withpen currentpen scaled 1/10;⟧ +will give the word% +\markelement{Span}{\setactualtext{example } +\directmetapost{beginfig(1) multidraw (contours "example" of "tenbf") +withpen currentpen scaled 1/10; baseline 0; endfig;}} +in a thin outline. + +Finally, two handy clipping macros have been added: +⟦*clipout⟧ and ⟦*clipto⟧, which both receive a list of paths as a ‘text’ +parameter and either clip their ensemble out of the picture, or the picture to +the ensemble. + + \section Running lua from within metapost %1 You can call out to lua with ⟦*runscript "lua code"⟧. For this purpose, each @@ -194,7 +249,7 @@ beginfig(1) fill fullcircle scaled 3cm withpattern(a) withcolor 3/4red; draw fullcircle scaled 3cm withpen pencircle scaled 1; endfig;}\stopelement{Figure}\vss}\hskip10pt\strut - +\par\nobreak ⟦% define the pattern picture letter; letter = maketext("a"); beginpattern(a) @@ -209,25 +264,16 @@ endfig;⟧ A small pattern library is available in the ⟦*minim-hatching.mp⟧ file; see the accompanying documentation sheet for an overview of patterns. -Tiling patterns cannot be used together with tikz/pgf; see below under -‘Resource management’. \section Other metapost extensions %1 -There is currently no support for the ⟦*glyph of⟧ operator. - You can set the baseline of an image with ⟦*baseline(p)⟧. There, ⟦p⟧ must either be a point through which the baseline should pass, or a number (where an x~coordinate of zero will be added). Transformations will be taken into account, hence the specification of two coordinates. The last given baseline will be used. -Previously-defined box resources can be included with ⟦*boxresource(nr)⟧. The -result will be an image object with the proper dimensions. This image can be -transformed in any way you like, but you cannot inspect the contents of the -resource within metapost. - You can write to tex’s log directly with ⟦*texmessage "hello"⟧. You can write direct pdf statements with ⟦*special "pdf: statements"⟧ and you @@ -235,6 +281,15 @@ can add comments to the pdf file with ⟦*special "pdfcomment: comments"⟧. Say ⟦*special "latelua: lua code"⟧ to insert a ⟦late_lua⟧ whatsit. All three specials can also be given as pre- or postscripts to another object. In that case, they will be added before or after the object they are attached to. +Do note that all ⟦special⟧ statements will appear at the beginning of the +image; use pre- and postscripts to drawing statements if the order matters. + +Minim-mp also provides a few elementary macros and constants that are +conspicuously absent from plain.mp; I hope their addition is uncontroversial. +The constants are ⟦*pi⟧ (355/113), ⟦*fullsquare⟧, ⟦*unitcircle⟧ and the +cmyk-colours ⟦*cyan⟧, ⟦*magenta⟧, ⟦*yellow⟧ and ⟦*key⟧. The macros are +⟦*clockwise⟧, ⟦*xshifted⟧, ⟦*yshifted⟧, ⟦*hflip⟧ and ⟦*vflip⟧, where the flips +are defined in such a way that ⟦p & hflip p⟧ gives the expected result. \section Lua interface %1 @@ -262,29 +317,6 @@ Each metapost instance is a table containing the following entries: ⟦env⟧&The lua environment for ⟦runscript⟧.\cr} -\section PDF resource management %1 - -This package can add ⟦/Pattern⟧ and ⟦/ColorSpace⟧ entries to all page and xform -resource dictionaries. -Both refer to a single, global dictionary shared by all pages. -Support for other keys may be added in the future. - -At the moment, this implementation only serves tiling pattern support; -the mechanism will be enabled automatically at the first use of a tiling -pattern (merely defining a pattern will not enable it) and is of little use for -anything else. -The relevant tables, should you want to expand on it yourself, are -⟦M.colourspaces⟧ and ⟦M.patterns⟧; see the source file for additional -instructions. - -Since pdf resource management must be done exactly once, this package may clash -with other graphics packages doing the same. -In particular, minim’s resource management will cause double (and thus invalid) -entries in pages’ attribute dictionaries when used together with \red{tikz} or -\red{pgf}. -They can be used together, however, if you do not use minim’s tiling patterns. - - \section Debugging %1 You can enable (global) debugging by saying ⟦*debug_pdf⟧ to metapost or @@ -321,9 +353,9 @@ processed; this information is still available inside the ⟦*finish_mpfigure⟧ callback that is executed just before the processed image is surrounded by properly-dimensioned boxes. -The ⟦*M.init_files⟧ table contains the list of metapost files that new instances -are initialised with. -The actual format will be loaded after the files in this table. +The ⟦*M.init_code⟧ table contains the code used for initialing new instances. +In it, the string ⟦INIT⟧ will be replaced with the value of the ⟦format⟧ option +(normally ⟦plain.mp⟧). \endmanual % diff --git a/Master/texmf-dist/doc/luatex/minim-mp/minim-mp.pdf b/Master/texmf-dist/doc/luatex/minim-mp/minim-mp.pdf Binary files differindex b511de32976..1011878d1e1 100644 --- a/Master/texmf-dist/doc/luatex/minim-mp/minim-mp.pdf +++ b/Master/texmf-dist/doc/luatex/minim-mp/minim-mp.pdf diff --git a/Master/texmf-dist/doc/luatex/minim-pdf/README b/Master/texmf-dist/doc/luatex/minim-pdf/README index 1d1f02a9135..d8f2b19c6ed 100644 --- a/Master/texmf-dist/doc/luatex/minim-pdf/README +++ b/Master/texmf-dist/doc/luatex/minim-pdf/README @@ -1,4 +1,4 @@ -Version: 2021/1.0 +Version: 2022/1.1 SUMMARY @@ -25,9 +25,32 @@ In order to obtain the typeset manual of this package, simply say: luatex minim-pdf.doc +HISTORY + +2022/1.1 (3/3/2022) + + New features: + + * Added support for structure element attributes. + * Added support for structure element attribute classes. + * Improved tagging of equations; added configuration. + * Made tagged artifacts more robust: they can now occur across page + breaks. + * The lua interface should now be more-or-less stable. + + Minor changes: + + * PDF strings will be encoded in a more clever (and readable) way. + * Structure element tags will have special characters encoded properly. + +2021/1.0 (1/6/2021) + + This was the original release. + + COPYING -(c) 2021 Esger Renkema +(c) 2022 Esger Renkema These files may be distributed under the terms of the European Union Public Licence (EUPL) version 1.2 or later. A copy can be obtained at: 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 2c06dd25b0e..71e8cea89cc 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 {2021-06-01} - version {2021/1.0} + date {2022-03-03} + version {2022/1.1} keywords {LuaTeX; Plain TeX; PDF/A; Tagged PDF; accessibility; a11y; hypertext; bookmarks; document outline; associated files} stopmetadata @@ -47,8 +47,9 @@ generated name. \section Bookmarks %1 -Bookmarks can be added with ⟦*\outline [open] [dest {name}] {title}⟧. -Add ⟦open⟧ to have the bookmark appear initially open and +Bookmarks can be added with ⟦*\outline [open|closed] [dest {name}] {title}⟧. +Add ⟦open⟧ or ⟦closed⟧ to have the bookmark appear initially open or +closed (default), and say ⟦dest {name}⟧ for having it refer to a specific named destination (otherwise, a new one will be created where the ⟦\outline⟧ command appears). @@ -129,11 +130,10 @@ With the minim-xmp package, a useful setting is \section Lua module %1 The interface of the lua module (available via -⟦local M = require('minim-pdf')⟧) is not stable yet, and may change. -One function of interest, however, is -⟦M.pdf_string(...)⟧, wich converts a lua string to a pdf string. The -surrounding ⟦<>⟧ or ⟦()⟧ characters are included in the return value. - +⟦local M = require('minim-pdf')⟧) should be stable by now. +Though it contains lua equivalents for most tex commands described here, using +them directly is not very ergonomical and not recommended. +Please consult the source if you do want to use them anyway. % @@ -160,7 +160,7 @@ be seen by tex’s stomach in the \emph{logical} order. Furthermore, while the macros in this package are sophisticated enough that tagging can be done without any manual intervantion, it is quite possible and -rather easy to generate the wrong document structore, or even cause syntax +rather easy to generate the wrong document structure, or even cause syntax errors in the resulting pdf code. You should always check the result in an external application. @@ -169,21 +169,17 @@ This is the full list of limitations, pitfalls and shortcomings: \item1. Document content must be seen by tex in its logical order (although you can mark out-of-order content explicitly if you know what you are doing; see below). -\item2. Artifacts cannot be split across pages. A pagebreak inmidst an artifact -will cause incorrect pdf without error or warning. -\item3. The contents of ⟦\localleftbox⟧ and ⟦\localrightbox⟧ must be marked +\item2. The contents of ⟦\localleftbox⟧ and ⟦\localrightbox⟧ must be marked manually, probably as artifact. -\item4. You must mark page header, page footer and footnote rule yourself; no +\item3. You must mark page header, page footer and footnote rule yourself; no default is set. -\item5. There currently is no way of marking xforms or other pdf objects as +\item4. There currently is no way of marking xforms or other pdf objects as content items of themselves. -\item6. The content of xforms (i.e. pdf objects created by ⟦\useboxresource⟧) +\item5. The content of xforms (i.e. pdf objects created by ⟦\useboxresource⟧) should not contain tagging commands. -\item7. Likewise, you should be careful with box reuse: it might work, but you +\item6. Likewise, you should be careful with box reuse: it might work, but you should check. -\item8. The use of structure element attributes is currently not supported -except in a limited number of cases. -\item9. This package currently only supports pdf~1.7 tagging and is not yet +\item7. This package currently only supports pdf~1.7 tagging and is not yet ready for use with pdf~2.0. \stoplist @@ -234,7 +230,7 @@ structure element instead. The begining and ending of a content item can be forced with ⟦*\startcontentitem⟧ and ⟦*\stopcontentitem⟧, while ⟦*\ensurecontentitem⟧ will only open a new content item if you are currently outside any. -If you need some part to be a single content item, that can use +If you need some part to be a single content item, you can use ⟦*\startsinglecontentitem ... \stopsinglecontentitem⟧. This will disable all SE and MCI tagging inside. @@ -249,8 +245,6 @@ Artifacts can be marked in two ways: with ⟦*\markartifact {type} {...}⟧ or w The ⟦type⟧ is written to the pdf attribute dictionary directly, so that if you need a subtype, you can write e.g. ⟦\startartifact {Pagination /Subtype/Header} etc⟧. -Do make sure your artifact does not contain a page break, as this will result -in invalid output. Inside artifacts, other structure content markers will be ignored. Furthermore, this package makes sure artifacts are never part of marked content items, @@ -281,11 +275,11 @@ perfect nor complete. You should always check the results in an external application. Particular care should be taken when ‘skipping’ structure levels: the sequence chapter – subsection – section will result in the section beneath the subsection. -If you are in doubt about an element being closed already, you can use +If you are in doubt whether an element has been closed already, you can use ⟦*\ensurestopelement {Tag}⟧ instead of ⟦\stopelement⟧ to prevent an error being raised. -All these helpful features can also be disabled by setting +All these helpful features can be disabled by setting ⟦*\strictstructuretagging⟧ to a positive value. Then, every structure element will have to be closed by an explicit closing tag, as in xml. In this case, ⟦\stopelement⟧ and ⟦\ensurestopelement⟧ will be equivalent. @@ -293,6 +287,8 @@ In this case, ⟦\stopelement⟧ and ⟦\ensurestopelement⟧ will be equivalent By default, ⟦P⟧ structure elements are inserted automatically at the start of every paragraph. The tag can be changed with ⟦*\nextpartag {Tag}⟧; leaving the argument empty will prevent marking the next paragraph. +Keep in mind that the reassignment is local: if a paragraph marked with +⟦\nextpartag⟧ starts inside a group, it will not reset. Auto-marking paragraphs can be (locally) disabled or enabled by saying ⟦*\markparagraphsfalse⟧ or ⟦*\markparagraphstrue⟧. @@ -326,20 +322,28 @@ in more complicated situations you should therefore use ⟦*\savecurrentelementto\name ... \continueelementfrom\name⟧ which restores the current SE from a named identifier ⟦\name⟧. - \section Structure element options %1 -The ⟦\startcontentitem⟧ command allows a few options that are not mentioned -above: its full syntax is ⟦*\startcontentitem <options> {Tag}⟧. +The ⟦\startelement⟧ command allows a few options that are not mentioned +above: its full syntax is ⟦*\startelement <options> {Tag}⟧. The three most useful options are ⟦alt⟧ for setting an alt-text (the ⟦/Alt⟧ entry in the structure element dicionary), ⟦actual⟧ for a text replacement (⟦/ActualText⟧) and ⟦lang⟧ for the language (⟦/Lang⟧; see the next section). The alternative and actual texts can also be given after the fact with -⟦*\setalttext{...}⟧ and ⟦*\setactualtext{...}⟧. These apply to the current +⟦*\setalttext{...}⟧ and ⟦*\setactualtext{...}⟧; these apply to the current structure element. -Setting structure element attributes is not supported at this moment, except -the placement attributes ⟦block⟧ and ⟦inline⟧, which can be given as options. +Structure element attributes can be given with +⟦attr <owner> <key> <value>⟧, e.g. ⟦attr Layout Placement /Inline⟧. +Note that for the ⟦owner⟧ and ⟦key⟧ the initial slash must be omitted; the +⟦value⟧ on the other hand will be written to the pdf verbatim. +Any number of attributes can be added. + +Finally, structure element classes can be given with the +⟦class <classname>⟧ keyword, which can be repeated. +Classes can be defined with +⟦*\newattributeclass classname <attributes>⟧ where ⟦<attributes>⟧ can be any +number of ⟦attr⟧ statements as above. \section Languages %1 @@ -358,7 +362,7 @@ separate codes to dialects. There is a small set of default language code associations, which can be found in the file ⟦minim-languagecodes.lua⟧. It covers most languages defined by the hyph-utf8 package, as well as (due to -their ubiquitous use) many ancient languages. +their ubiquitous use) some ancient languages. An actual language change introduced by ⟦\uselanguage⟧ will not otherwise be acted upon by this package. Therefore, you will probably want to add @@ -381,7 +385,7 @@ This package ensures the existence of the ⟦nohyph⟧, ⟦nolang⟧, ⟦uncoded ⟦undetermined⟧ dummy languages, all without hyphenation. -\section Helper macros +\section 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 @@ -410,14 +414,18 @@ 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⟧. -Both alt and actualtext of the ⟦Formula⟧ structure element will be set to the -(unexpanded) source code of the equation, surrounded by the appropriate number -of dollar signs. -Furthermore, if ⟦\pdfaconformancelevel⟧ equals three, the source of the formula -will be attached in an embedded file with the ⟦/AFRelation⟧ set to ⟦Source⟧. +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 Binary files differindex b460bdf4ed8..414e577186a 100644 --- a/Master/texmf-dist/doc/luatex/minim-pdf/minim-pdf.pdf +++ b/Master/texmf-dist/doc/luatex/minim-pdf/minim-pdf.pdf diff --git a/Master/texmf-dist/doc/luatex/minim-xmp/README b/Master/texmf-dist/doc/luatex/minim-xmp/README index 0383085ee2b..46d9d3cc6e3 100644 --- a/Master/texmf-dist/doc/luatex/minim-xmp/README +++ b/Master/texmf-dist/doc/luatex/minim-xmp/README @@ -1,4 +1,4 @@ -Version: 2021/1.0 +Version: 2022/1.1 SUMMARY @@ -19,9 +19,22 @@ In order to obtain the typeset manual of this package, simply say: luatex minim-xmp.doc +HISTORY + +2022/1.1 (3/3/2022) + + New features: + + * Writing metadata can now be disabled globally. + +2021/1.0 (1/6/2021) + + This was the original release. + + COPYING -(c) 2021 Esger Renkema +(c) 2022 Esger Renkema These files may be distributed under the terms of the European Union Public Licence (EUPL) version 1.2 or later. A copy can be obtained at: diff --git a/Master/texmf-dist/doc/luatex/minim-xmp/minim-xmp.doc b/Master/texmf-dist/doc/luatex/minim-xmp/minim-xmp.doc index 01d2084f6ce..57fe527d2c8 100644 --- a/Master/texmf-dist/doc/luatex/minim-xmp/minim-xmp.doc +++ b/Master/texmf-dist/doc/luatex/minim-xmp/minim-xmp.doc @@ -8,8 +8,8 @@ \else \startmetadata author {Esger Renkema} title {minim-xmp} - date {2021-06-01} - version {2021/1.0} + date {2022-03-03} + version {2022/1.1} keywords {LuaTeX; Plain TeX; XMP; metadata; PDF/A;} stopmetadata \maketitle \fi @@ -156,6 +156,68 @@ after which the generated XMP code will be </colours:Favourite> </rdf:Description>⟧ +If use of the pdf/a format is detected (i.e. a ⟦pdfaid⟧ entry is present in the +metadata), the following pdf/a extension schema will also be generated: + +\font\seventt {Latin Modern Mono:script=latn;+smcp;} at 7pt +\begingroup\rightskip=-6cm\baselineskip=9pt +⟦∥let∥tentt∥seventt∥seventt<rdf:Description rdf:about="" + xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/" + xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#" + xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#" + xmlns:pdfaType="http://www.aiim.org/pdfa/ns/type#" + xmlns:pdfaField="http://www.aiim.org/pdfa/ns/field#" > + <pdfaExtension:schemas> + <rdf:Bag> + <rdf:li rdf:parseType="Resource"> + <pdfaSchema:schema>Example namespace</pdfaSchema:schema> + <pdfaSchema:namespaceURI>http://example.com/minim/colours/</pdfaSchema:namespaceURI> + <pdfaSchema:prefix>colours</pdfaSchema:prefix> + <pdfaSchema:property> + <rdf:Seq> + <rdf:li rdf:parseType="Resource"> + <pdfaProperty:name>Favourite</pdfaProperty:name> + <pdfaProperty:valueType>Colour</pdfaProperty:valueType> + <pdfaProperty:category>external</pdfaProperty:category> + <pdfaProperty:description>The author’s favourite colour</pdfaProperty:description> + </rdf:li> + </rdf:Seq> + </pdfaSchema:property> + <pdfaSchema:valueType> + <rdf:Seq> + <rdf:li rdf:parseType="Resource"> + <pdfaType:type>Colour</pdfaType:type> + <pdfaType:namespaceURI>http://example.com/minim/colours/</pdfaType:namespaceURI> + <pdfaType:prefix>c</pdfaType:prefix> + <pdfaType:description>RGB Colour</pdfaType:description> + <pdfaType:field> + <rdf:Seq> + <rdf:li rdf:parseType="Resource"> + <pdfaField:name>B</pdfaField:name> + <pdfaField:valueType>Integer</pdfaField:valueType> + <pdfaField:description>Blue component</pdfaField:description> + </rdf:li> + <rdf:li rdf:parseType="Resource"> + <pdfaField:name>G</pdfaField:name> + <pdfaField:valueType>Integer</pdfaField:valueType> + <pdfaField:description>Green component</pdfaField:description> + </rdf:li> + <rdf:li rdf:parseType="Resource"> + <pdfaField:name>R</pdfaField:name> + <pdfaField:valueType>Integer</pdfaField:valueType> + <pdfaField:description>Red component</pdfaField:description> + </rdf:li> + </rdf:Seq> + </pdfaType:field> + </rdf:li> + </rdf:Seq> + </pdfaSchema:valueType> + </rdf:li> + </rdf:Bag> + </pdfaExtension:schemas> +</rdf:Description>⟧ +\par\endgroup + You probably will not need defining your own value types, so in most cases you should omit the fifth argument to ⟦add_namespace⟧. If you do define a new value type, you can specify its prefix if it differs @@ -182,6 +244,8 @@ All metadata will be written to the PDF file uncompressed. The ⟦*\metadatamodification⟧ setting controls whether XMP packets will be marked as read-only (value~0; default) or writeable (value~1). Writeable XMP packets will be padded with about 2\thinspace kB of whitespace. +You can prohibit writing metadata altogether +by specifying ⟦*\writedocumentmetadata = 0⟧. If the document-level metadata contains values in the ⟦pdfaid⟧ namespace, metadata extension schemas will be appended to the document-level metadata diff --git a/Master/texmf-dist/doc/luatex/minim-xmp/minim-xmp.pdf b/Master/texmf-dist/doc/luatex/minim-xmp/minim-xmp.pdf Binary files differindex fdf048a8575..11c86a9d673 100644 --- a/Master/texmf-dist/doc/luatex/minim-xmp/minim-xmp.pdf +++ b/Master/texmf-dist/doc/luatex/minim-xmp/minim-xmp.pdf diff --git a/Master/texmf-dist/doc/luatex/minim/README b/Master/texmf-dist/doc/luatex/minim/README index 4a16b4e8018..31c34b28bfc 100644 --- a/Master/texmf-dist/doc/luatex/minim/README +++ b/Master/texmf-dist/doc/luatex/minim/README @@ -1,4 +1,4 @@ -Version: 2021/1.0 +Version: 2022/1.1 SUMMARY @@ -29,9 +29,33 @@ For the sake of completeness, this manual also includes the documentation of the packages mentioned above. +HISTORY + +2022/1.1 (3/3/2022) + + Major changes: + + * Updated the allocation mechanism, distinguishing the new_<register>() + allocators from the new registernumber() function. + * Included a new (pgf-compatible) pdf resource manager. + + Minor changes: + + * Updated the manual to reflect the latest versions of the other minims. + * Included a few helper functions moved in from minim-pdf. + * Fixed a bug where the primitive callback.register() could not remove + list callbacks (the module’s M.register() still cannot). + * Added an M.deregister() function for callbacks. + * Added a uselanguage callback. + +2021/1.0 (1/6/2021) + + This was the original release. + + COPYING -(c) 2021 Esger Renkema +(c) 2022 Esger Renkema, Michal Vlasák These files may be distributed under the terms of the European Union Public Licence (EUPL) version 1.2 or later. A copy can be obtained at: diff --git a/Master/texmf-dist/doc/luatex/minim/minim-alloc.doc b/Master/texmf-dist/doc/luatex/minim/minim-alloc.doc index fa08988bf43..edf268c81df 100644 --- a/Master/texmf-dist/doc/luatex/minim/minim-alloc.doc +++ b/Master/texmf-dist/doc/luatex/minim/minim-alloc.doc @@ -1,6 +1,8 @@ \input minim-doc.sty +\chapter Programming macros + This chapter describes the programming helper modules on which all the above modules depend. It mainly concerns register allocation, callback management and format file inclusion. @@ -78,15 +80,8 @@ name, the number of that register will be returned. You will need this when you want to allow your lua code to be included in a format file; it has nothing to do with the tex-side ⟦\countdef⟧ and the like. -For the new allocation macros listed above and (as a special case) for -⟦\newbox⟧, -after saying ⟦\newwhatsit\name⟧, the call ⟦M.new_whatsit('name')⟧ will return -the number of ⟦\name⟧. For the other (older) allocation macros, this is not the -case. After all, because of the ⟦\countdef⟧ etc. included in ⟦\newcount⟧ etc. -you can already use ⟦tex.count['name']⟧ etc. for retrieving tex-side -allocations from lua. The exceptions to this are ⟦\newbox⟧, which is why it is -included with the new macros, and ⟦\newattribute⟧, for which you can use both -methods. +If you want to access from lua a register defined in tex, the function +⟦*M.registernumber('name')⟧ will give you the index of register ⟦\name⟧. Besides ⟦\newluachunkname\name⟧, you can also use ⟦*\setluachunkname \name {actual name}⟧ @@ -102,21 +97,24 @@ take no parameters. As noted at the beginning of this chapter, the callback functions are only available after you say ⟦local C = require('minim-callbacks')⟧. -This module will override the primitive callback functions with its own -⟦*C.register⟧, ⟦*C.find⟧ and ⟦*C.list⟧; the original primitive functions can be -found in the ⟦*C.primitives⟧ table. - The simple function of this module is allowing multiple callbacks to co-exist. Different callbacks call for different implementations, and some callbacks can -only contain a single function. -Any callbacks that are already assigned before loading this module will be -preserved; this includes the ltluatex callback mechanism if it has already been -installed. +only contain a single function. Its interface matches the primitive interface, +with ⟦*C.register(callback, fn)⟧, ⟦*C.find(callback)⟧ and ⟦*C.list()⟧ taking +the same arguments. In addition to these, ⟦*C.deregister(fn)⟧ will allow you to +remove a callback. This is necessary when you want to remove a callback from +a list or from the bottom of a stack. The ⟦fn⟧ variable should point to the +same object. -You can create your own callbacks with ⟦*C.new_callback(name, type)⟧. The ⟦type⟧ -should be one of the types mentioned below or ⟦'single'⟧ for callbacks that -allow only one function. If the ⟦name⟧ is that of a primitive callback, new -registrations will target your new callback. +Any callbacks that are already assigned before loading this module will be +preserved and the primitive callback interface is still available, though +callbacks registered through the latter will actually use the new functions. +Ltluatex may be loaded either before or after this module. + +You can create your own callbacks with ⟦*C.new_callback(name, type)⟧. The +⟦type⟧ should be one of the types mentioned below or ⟦'single'⟧ for callbacks +that allow only one function. If the ⟦name⟧ is that of a primitive callback, +new registrations will target your new callback. You can call the new callback with ⟦*C.call_callback(name, ...)⟧, adding any number of parameters. @@ -131,7 +129,6 @@ Callbacks of this type are ⟦vpack_filter⟧, ⟦pre_output_filter⟧ and ⟦mlist_to_mlist⟧. -There is no way of unregistering callbacks of this type. Similarly, for the ⟦*data⟧ callbacks ⟦process_input_buffer⟧, @@ -153,6 +150,7 @@ will be called. These are Register ⟦nil⟧ at the callback to pop a function off the stack. Finally, for the ⟦*simple⟧ callbacks +⟦uselanguage⟧, ⟦contribute_filter⟧, ⟦pre_dump⟧, ⟦wrapup_run⟧, @@ -164,21 +162,50 @@ Finally, for the ⟦*simple⟧ callbacks ⟦process_rule⟧. all registered functions are called in order with the same arguments. -The new ⟦*mlist_to_mlist⟧ callback is called before ⟦mlist_to_hlist⟧ and should -not convert noads to nodes. +Two callbacks are new: +the new ⟦*mlist_to_mlist⟧ callback is called before ⟦mlist_to_hlist⟧ and should +not convert noads to nodes, while the ⟦*uselanguage⟧ callback is called from +⟦\uselanguage⟧. If you create a new callback with a number for a name, that callback will replace the ⟦*process_rule⟧ callback when its number matches the index property of the rule. +\section Programming helpers + +Optional keyword arguments to tex macros can be defined with help of +⟦*M.options_scanner()⟧. An example from the definition of minim-pdf’s +⟦\outline⟧: + +⟦ local s = M.options_scanner() + :keyword('open', 'closed') + :string('dest') + :scan() + s.title = token.scan_string() + M.add_bookmark(s)⟧ + +Here, the ⟦keyword⟧ function adds two opposite keywords: if one is present, its +value will be set to ⟦true⟧ and the other’s to ⟦false⟧ (the second keyword is +optional). The ⟦string⟧ function stores the result of ⟦token.scan_string⟧ under +its key. Of the same form you have ⟦int⟧, ⟦glue⟧, ⟦dimen⟧, ⟦argument⟧, ⟦word⟧ +and ⟦list⟧. All these take an optional second argument: if ⟦true⟧ then the +keyword can be repeated and its values will be stored as a list. + +The ⟦scan⟧ function, finally, scans all keywords, which may appear in any +order. You can give it a table with default values. In the example given above, +the argument ⟦s⟧ to ⟦M.add_bookmark⟧ will consist of a table with at most the +following entries: ⟦open⟧, ⟦closed⟧, ⟦dest⟧ and ⟦title⟧, though entries whose +keywords do not occur will not be present. + +This function is particularly useful when used together with +⟦*M.luadef('csname', function, ...)⟧, which defines primitive-like tex macros +from lua. There, ⟦function⟧ can be any function (it will be assigned a lua +function register) and at the place of the dots you may append ⟦'protected'⟧ +and/or ⟦'global'⟧. -\section Miscellaneous functions -This section describes functions and macros that are internal to this package, -but might be of general usefulness. +\section Miscellaneous functions -For instance, you might find the function ⟦*M.table_to_text(table)⟧ useful when -debugging lua code. The small functions ⟦*M.msg(...)⟧, ⟦*M.log(...)⟧ and ⟦*M.err(...)⟧ include a call to ⟦M.string.format⟧; @@ -186,14 +213,24 @@ additionally, ⟦*M.amsg(...)⟧ and ⟦*M.alog(...)⟧ do not start a new line. -Very useful is ⟦*M.luadef('csname', function, ...)⟧ for defining primitive-like -tex macros from lua: ⟦function⟧ can be any function (it will be assigned a lua -function register) and at the place of the dots you may append ⟦'protected'⟧ -and/or ⟦'global'⟧. - Both ⟦*M.unset⟧ and ⟦*\unset⟧ contain the value ⟦-0x7FFFFFFF⟧ that can be used for clearing attributes. +When writing data to pdf literals, ⟦*M.pdf_string(...)⟧, +⟦*M.pdf_name(...)⟧ and ⟦*M.pdf_date(...)⟧ may be useful: they produce strings +that can be written to the pdf directly. Surrounding ⟦<>⟧ or ⟦()⟧ characters or +a leading ⟦/⟧ will be included in the return value. The ⟦M.pdf_date⟧ function +expects a value of the form ⟦yyyy[-mm[-dd]]⟧ and returns a date of the form +⟦(D:yyyymmdd)⟧. +The function ⟦M.pdf_string⟧ is also available to tex through the macro +⟦*\pdfstring⟧. + +Finally the function ⟦*M.table_to_text(table)⟧ may be useful when debugging lua +code: it dumps a table as a (lua-readable) string. Cyclic references will spin +in into an eternal loop, however. + +\section Miscellaneous helper macros + On the tex side, ⟦*\voidbox⟧, ⟦*\ignore⟧, ⟦*\spacechar⟧, ⟦*\unbrace⟧, ⟦*\firstoftwo⟧ and ⟦*\secondoftwo⟧ should be self-explanatory and uncontroversial additions. For looking ahead, you can use diff --git a/Master/texmf-dist/doc/luatex/minim/minim.doc b/Master/texmf-dist/doc/luatex/minim/minim.doc index d16250a0fe9..a0ad8f2d4a1 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 {2021-06-01} - version {2021/1.0} + date {2022-03-03} + version {2022/1.1} keywords {LuaTeX; Plain TeX; MetaPost; PDF/A; Tagged PDF; accessibility; a11y; Unicode mathematics; XMP; metadata; hypertext; bookmarks} stopmetadata @@ -62,12 +62,7 @@ Please get in touch if you find this not the case. Particular care has been taken to be compatible with \red{ltluatex}. All overlapping functions should produce the same results and ltluatex can be loaded either before or after minim. - -One point of incompatibility exists between \red{tikz/pgf} and the pattern -functionality of minim-mp, due to conflicting implementations of pdf resource -management. -If you do not use filling patterns, however, the two packages can be used -together. +Earlier incompatibilities with \red{pgf} have been resolved. \licencesection diff --git a/Master/texmf-dist/doc/luatex/minim/minim.pdf b/Master/texmf-dist/doc/luatex/minim/minim.pdf Binary files differindex 715525bcf9d..1596eb65d42 100644 --- a/Master/texmf-dist/doc/luatex/minim/minim.pdf +++ b/Master/texmf-dist/doc/luatex/minim/minim.pdf |