diff options
Diffstat (limited to 'Master/texmf-dist/doc/luatex')
-rw-r--r-- | Master/texmf-dist/doc/luatex/luamplib/NEWS | 84 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf | bin | 198665 -> 253794 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luamplib/test-luamplib-latex.tex | 109 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luamplib/test-luamplib-plain.tex | 91 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luatexja/README | 6 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf | bin | 699725 -> 700023 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf | bin | 1143479 -> 1143849 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx | 30 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luaxml/README | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luaxml/luaxml.pdf | bin | 119150 -> 124725 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luaxml/luaxml.tex | 92 |
11 files changed, 395 insertions, 19 deletions
diff --git a/Master/texmf-dist/doc/luatex/luamplib/NEWS b/Master/texmf-dist/doc/luatex/luamplib/NEWS index 9cd7c571717..1e4fcf9520f 100644 --- a/Master/texmf-dist/doc/luatex/luamplib/NEWS +++ b/Master/texmf-dist/doc/luatex/luamplib/NEWS @@ -1,5 +1,89 @@ History of the luamplib package +2024/07/27 2.34.3 + * in DVI mode, use LaTeX's shipout hooks to generate new XObjects + or to put resources to pageresources. (in plain, load atbegshi.sty) + + * fix shading to allow the even-odd rule + +2024/07/24 2.34.2 + * With the newly introduced macros, \mplibgroup ... \endmplibgroup, users + can define a transparency group or a normal form XObject from TeX side. + The LaTeX environment 'mplibgroup' is identical to this pair of macros. + See the document for details. + + * document: be more precise about the color effect of a transparency group + + * remove trailing zeros from numeric objects to get smaller PDF + +2024/07/19 2.34.1 + * transparency group is available with plain format as well. + * transparency group once used is reusable in the TeX code or + in other MetaPost code chunks. see the document for details. + +2024/07/17 2.34.0 + * support transparency group with metafun format + * fix regarding default value in circular fading mode + * fix regarging the scope of graphics state + +2024/07/14 2.33.1 + * refactor the manual, including some minor items undocumented so far + * improve fading routine to get possibly smaller pdf file + +2024/07/08 2.33.0 + * provide a new metapost operator 'withfademethod' and related macros, + which make the color of an object gradiently transparent. see luamplib + document for details. + + * fix spot-color shading routine to support user-defined colorspace + +2024/07/03 2.32.4 + * make the variable 'patterns' local + * 'math.randomseed' on plain TeX + * remove redundant code 'fullcircle scaled 0' + +2024/06/21 2.32.3 + * 'coloured' is a synonym of the option 'colored' in pattern definition. + + * fix a bug related to pdf page resources in dvi mode + + * users can access the lua table containing mplib instances 'luamplib.instances', + through which metapost variables are also easily accessible as documented in + LuaTeX manual 11.2.8.4. + +2024/06/14 2.32.2 + * fix matrix conversion between MP and PDF + +2024/06/13 2.32.1 + * for the sake of convenience, width and height values of tiling patterns + will be written down into the log file. + + * table type is allowed as well as string type for 'matrix' and 'bbox' + options in pattern definition. + + * metapost code such as 'rotated 30 slanted .2' is allowed as well as the + string or table of numbers for the 'matrix' option in pattern definition. + + * as for the 'resources' option in pattern definition, luamplib + automatically includes the resources of the current page. + + * luamplib does not log info even if there's no beginfig ... endfig. + +2024/06/10 2.32.0 + * \mppattern{<name>} ... \endmppattern defines a tiling pattern which can be + used with 'withpattern' operator to fill a closed path by replicating the tile + horizontally and vertically. \begin{mppattern} ... \end{mppattern} is exactly + the same as \mppattern ... \endmppattern. See luamplib manual for details. + +2024/05/30 2.31.2 + * support vertical writing mode in mpliboutlinetext (presently luatexko + package only, and except horizontal mode inside vertical mode) + + * after the process of mpliboutlinetext, mpliboutlinepic[1] ... + mpliboutlinepic[mpliboutlinenum] will be preserved as an array of images + each of which containing a glyph or a rule. N.B. Unicode grapheme cluster + is not considered here. + 2024/05/24 2.31.1 * fix bugs in outlinetext routine * improve rule treatment in graphictext diff --git a/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf b/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf Binary files differindex 9db810d3601..448c237835c 100644 --- a/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf +++ b/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf diff --git a/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-latex.tex b/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-latex.tex index fd5cb6fe007..22b30b07604 100644 --- a/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-latex.tex +++ b/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-latex.tex @@ -7,7 +7,7 @@ \usepackage{fontspec} \setmainfont{latin modern roman} \usepackage{luamplib} -\usepackage{xcolor} +\usepackage{graphicx,xcolor} \everymplib{ beginfig(0); } \everyendmplib{ endfig; } \mpliblegacybehavior{true}% @@ -227,11 +227,116 @@ endfor \mpfig circleit.a(btex\tracingcommands0 Box 1 etex); drawboxed(a); \endmpfig \def\mpfiginstancename{mympfig}% \mpfig -draw mpliboutlinetext.b ("$\sqrt{2+\alpha}$") +draw mpliboutlinetext.b ("$\displaystyle\frac{1}{1-x^2}$") (withcolor .6[red,white]) (withpen pencircle scaled .2 withcolor red) scaled 4 ; \endmpfig +\par +\mpfig + draw mpliboutlinetext.r + ("Question") + ( withpen pencircle scaled .3 ) + ( + withshademethod "linear" + withshadedirection (2.5, 0.5) + withshadecolors(red, blue) + ) + scaled 4; +\endmpfig +\par\leavevmode +\mppattern{mypatt} +[ + xstep = 5, ystep = 6, +% matrix = "rotated 30", +] +\mpfig +draw (llcorner unitsquare--urcorner unitsquare) scaled 5 withcolor 1/3[blue,white] ; +draw (ulcorner unitsquare--lrcorner unitsquare) scaled 5 withcolor 1/3[red,white] ; +\endmpfig +\endmppattern +\mpfig +draw unitsquare shifted -center unitsquare scaled 45 withpostscript "collect" ; +draw fullcircle scaled 100 withpattern "mypatt" withpen pencircle scaled 1 + withcolor \mpcolor{red!50!blue!50} withpostscript "evenodd" ; +\endmpfig +\begin{mppattern}{pattuncolored} + [ + colored = false, + matrix = "slanted .3 rotated 30", + ] + \tiny\TeX +\end{mppattern}\relax +\mpfig + picture tex; + tex = mpliboutlinetext.p ("\bfseries \TeX"); + for i=1 upto mpliboutlinenum: + draw image( + j:=0; + for item within mpliboutlinepic[i]: + j:=j+1; + draw pathpart item scaled 10 + if j < length mpliboutlinepic[i]: + withpostscript "collect" + else: + withpattern "pattuncolored" + withpen pencircle scaled 1/2 + withcolor (i/4)[red,blue] + fi; + endfor + ) + withfademethod "linear" + ; + endfor +\endmpfig +\par\leavevmode +\mpfig + picture mill; mill = btex \includegraphics[width=100bp]{mill} etex; + draw mill; + mill := mill shifted 125right; + draw mill + withfademethod "circular" + withfadecenter (center mill, center mill) + withfaderadius (30, abs(lrcorner mill - llcorner mill)/2) + withfadeopacity (1, 0) + ; +\endmpfig +\par +\def\test#1{% + \mpfig + fill unitsquare shifted -center unitsquare scaled 200 + withshademethod "linear" + withshadecolors (.3[red,white], .3[blue,white]) + ; + label( btex MetaPost etex scaled 3, origin) ; + draw image( + fill fullcircle scaled 100 shifted 25left + withcolor .8white + withtransparency (2,1) + ; + fill fullcircle scaled 100 shifted 25right + withcolor .8white + withtransparency (2,1) + ; + ) + asgroup "#1" + withgroupname "test:#1" + withtransparency (1,.5) + ; + currentpicture := currentpicture scaled 2/3; + \endmpfig +}% +\hbox{\test{isolated,knockout}\,\test{isolated}\vbox to\MPheight{\vss\hbox{~isolated}\vss}}% +\hbox{\test{knockout}\,\test{}}% +\hbox to\MPwidth{\hss knockout\hss}% +\leavevmode +\mpfig usemplibgroup "test:isolated,knockout" scaled 2/3 rotated 15 ; \endmpfig +\usemplibgroup{test:isolated,knockout}% +\begin{mplibgroup}{mytex}[matrix="rotated 15"] \TeX \end{mplibgroup}% +\hbox to0pt{\hss\vrule width.5pt height5pt depth5pt\hss}% +\hbox to0pt{\hss\vrule width10pt height.25pt depth.25pt\hss}% +\usemplibgroup{mytex}% +\mpfig usemplibgroup "mytex"; draw (left--right) scaled 5; draw (up--down) scaled 5; \endmpfig \tracingcommands0 \vskip 2\baselineskip diff --git a/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-plain.tex b/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-plain.tex index 61ea9e8ae75..0804ca5a9be 100644 --- a/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-plain.tex +++ b/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-plain.tex @@ -220,11 +220,98 @@ endfor \mpfig circleit.a(btex\tracingcommands0 Box 1 etex); drawboxed(a); \endmpfig \def\mpfiginstancename{mympfig}% \mpfig -draw mpliboutlinetext.b ("$\sqrt{2+\alpha}$") +draw mpliboutlinetext.b ("$\overbrace{x+\cdots+x}^k$") (withcolor .6[red,white]) (withpen pencircle scaled .2 withcolor red) - scaled 4 ; + scaled 3 ; \endmpfig +\par +\mpfig + draw mpliboutlinetext.r + ("Question") + ( withpen pencircle scaled .3 ) + ( + withshademethod "linear" + withshadedirection (2.5, 0.5) + withshadecolors(red, blue) + ) + scaled 4; +\endmpfig +\par\leavevmode +\mppattern{mypatt} + \mpfig + picture q; + q := btex Q etex; + fill bbox q withcolor .8[red,white]; + draw q withcolor .8red; + \endmpfig +\endmppattern +\mpfig + fill fullcircle scaled 100 withpostscript "collect"; + draw unitsquare shifted - center unitsquare scaled 45 + withpattern "mypatt" + withpostscript "evenodd" + ; +\endmpfig +\mppattern{pattuncolored} + [ + colored = false, + matrix = "slanted .3 rotated 30", + ] + \fiverm\TeX +\endmppattern +\mpfig + picture tex; + tex = mpliboutlinetext.p ("\bf \TeX"); + draw image( + for i=1 upto mpliboutlinenum: + j:=0; + for item within mpliboutlinepic[i]: + j:=j+1; + draw pathpart item scaled 10 + if j < length mpliboutlinepic[i]: + withpostscript "collect" + else: + withpattern "pattuncolored" + withpen pencircle scaled 1/2 + withcolor (i/4)[red,blue] + fi; + endfor + endfor + ) + withfademethod "linear" + ; +\endmpfig +\par\leavevmode +\mpfig +fill fullcircle scaled 125 withcolor 2/3[blue,white]; +fill fullcircle scaled 80 withcolor 2/3[red,white]; +draw image( + draw (left--right) rotated 45 scaled 50 + withpen pencircle scaled 20 + ; + draw (left--right) rotated -45 scaled 50 + withpen pencircle scaled 20 + ; + ) + asgroup "" + withgroupname "testTRgroup" + withprescript "tr_transparency=.3" + ; +\endmpfig +\mpfig +fill fullcircle scaled 125 withcolor 2/3[red,white]; +fill fullcircle scaled 80 withcolor 2/3[blue,white]; +usemplibgroup "testTRgroup" + withfademethod "circular" + withfaderadius (0,60) + ; +\endmpfig +\mplibgroup{mytex}[matrix="rotated 15"] \TeX \endmplibgroup +\hbox to0pt{\hss\vrule width.5pt height5pt depth5pt\hss}% +\hbox to0pt{\hss\vrule width10pt height.25pt depth.25pt\hss}% +\usemplibgroup{mytex}% +\mpfig usemplibgroup "mytex"; draw (left--right) scaled 5; draw (up--down) scaled 5; \endmpfig \tracingcommands0 \vskip 2\baselineskip diff --git a/Master/texmf-dist/doc/luatex/luatexja/README b/Master/texmf-dist/doc/luatex/luatexja/README index 9224c83b0b1..0bc40ac6434 100644 --- a/Master/texmf-dist/doc/luatex/luatexja/README +++ b/Master/texmf-dist/doc/luatex/luatexja/README @@ -1,4 +1,4 @@ -The LuaTeX-ja Package 20240514.0 +The LuaTeX-ja Package 20240714.0 -------------------------------- Copyright (c) 2011--2024 The LuaTeX-ja project License: modified BSD (see COPYING) @@ -42,7 +42,7 @@ Installation 2. If you must/want to install manually: a. Download the source archive from CTAN, - or tagged as 20240514.0 in the Git repository by + or tagged as 20240714.0 in the Git repository by <https://github.com/luatexja/luatexja/archive/refs/tags/$VER.zip> b. Extract the archive and process following three files by LuaLaTeX @@ -92,4 +92,4 @@ Notes This file and ltj-kinsoku.lua are not used anymore. (Do not remove ltj-kinsoku.tex.) -Last commit date: Tue May 14 19:12:05 2024 +0900 +Last commit date: Sun Jul 14 08:56:04 2024 +0900 diff --git a/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf b/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf Binary files differindex de28e1d279c..eac7af315de 100644 --- a/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf +++ b/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf diff --git a/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf b/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf Binary files differindex 49a8a6feef0..ee55789a603 100644 --- a/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf +++ b/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf diff --git a/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx b/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx index b550dc58d44..9ad52094656 100644 --- a/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx +++ b/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx @@ -1467,14 +1467,19 @@ Alphabetic fonts &\cs{fontspec}&\cs{setmainfont}&\cs{setsansfont}&\cs{setmonofont}\\ \midrule Japanese fonts -&\cs{newjfontfamily}&\cs{renewjfontfamily}&\cs{setjfontfamily}\\ +&\cs{newjfontfamily}&\cs{renewjfontfamily}&\cs{setjfontfamily}&\cs{providejfontfamily}\\ Alphabetic fonts -&\cs{newfontfamily}&\cs{renewfontfamily}&\cs{setfontfamily}\\ +&\cs{newfontfamily}&\cs{renewfontfamily}&\cs{setfontfamily}&\cs{providefontfamily}\\ \midrule Japanese fonts -&\cs{newjfontface}&\cs{defaultjfontfeatures}&\cs{addjfontfeatures}\\ +&\cs{newjfontface}&\cs{renewjfontface}&\cs{setjfontface}&\cs{providejfontface}\\ Alphabetic fonts -&\cs{newfontface}&\cs{defaultfontfeatures}&\cs{addfontfeatures}\\ +&\cs{newfontface}&\cs{renewfontface}&\cs{setfontface}&\cs{providefontface}\\ +\midrule +Japanese fonts +&\cs{defaultjfontfeatures}&\cs{addjfontfeatures}\\ +Alphabetic fonts +&\cs{defaultfontfeatures}&\cs{addfontfeatures}\\ \bottomrule \end{tabular}\par} \end{table} @@ -1492,14 +1497,19 @@ Alphabetic fonts &\cs{fontspec}&\cs{setmainfont}&\cs{setsansfont}&\cs{setmonofont}\\ \midrule \emph{和文} -&\cs{newjfontfamily}&\cs{renewjfontfamily}&\cs{setjfontfamily}\\ +&\cs{newjfontfamily}&\cs{renewjfontfamily}&\cs{setjfontfamily}&\cs{providejfontfamily}\\ +\emph{欧文} +&\cs{newfontfamily}&\cs{renewfontfamily}&\cs{setfontfamily}&\cs{providefontfamily}\\ +\midrule +\emph{和文} +&\cs{newjfontface}&\cs{renewjfontface}&\cs{setjfontface}&\cs{providejfontface}\\ \emph{欧文} -&\cs{newfontfamily}&\cs{renewfontfamily}&\cs{setfontfamily}\\ +&\cs{newfontface}&\cs{renewfontface}&\cs{setfontface}&\cs{providefontface}\\ \midrule \emph{和文} -&\cs{newjfontface}&\cs{defaultjfontfeatures}&\cs{addjfontfeatures}\\ +&\cs{defaultjfontfeatures}&\cs{addjfontfeatures}\\ \emph{欧文} -&\cs{newfontface}&\cs{defaultfontfeatures}&\cs{addfontfeatures}\\ +&\cs{defaultfontfeatures}&\cs{addfontfeatures}\\ \bottomrule \end{tabular}\par} \end{table} @@ -7833,7 +7843,7 @@ stretch_priority={kanjiskip=-35,xkanjiskip=-25,others=50} さらに,バージョン20220211.0以降では次の命令が提供される. \begin{cslist} - \item[\cs{ltjghostbeginjachar}] + \item[\cs{ltjghostbeforejachar}] \LuaTeX-ja本体が提供している\cs{ltjfakeparbegin}, \cs{ltjfakeboxbdd}と類似の命令である. 実行された箇所が(限定・非限定を問わず)水平モードであった場合に,実行された箇所は 「文字クラス0の\textbf{JAchar}」の直前であると, @@ -7850,7 +7860,7 @@ A\LG 字 \par% ==> ALchar--(xkanjiskip)--\LG \end{LTXexample} \item[\cs{ltjghostafterjachar}] - \cs{ltjghostbeginjachar}と対を成す命令で,実行された箇所は + \cs{ltjghostbeforejachar}と対を成す命令で,実行された箇所は 「文字クラス0の\textbf{JAchar}」の直後であると, \LuaTeX-jaの和文処理グルー挿入処理に認識させる.以下の実行例を参照. diff --git a/Master/texmf-dist/doc/luatex/luaxml/README b/Master/texmf-dist/doc/luatex/luaxml/README index 5df074c453b..6a81ab25ce0 100644 --- a/Master/texmf-dist/doc/luatex/luaxml/README +++ b/Master/texmf-dist/doc/luatex/luaxml/README @@ -32,7 +32,7 @@ Author ------ Michal Hoftich Email: michal.h21@gmail.com -Version: v0.1r, 2024-02-23 +Version: v0.2, 2024-07-14 Original authors: Paul Chakravarti and Manoel Campos (http://manoelcampos.com) diff --git a/Master/texmf-dist/doc/luatex/luaxml/luaxml.pdf b/Master/texmf-dist/doc/luatex/luaxml/luaxml.pdf Binary files differindex f574a0a5287..071fa4e4cd0 100644 --- a/Master/texmf-dist/doc/luatex/luaxml/luaxml.pdf +++ b/Master/texmf-dist/doc/luatex/luaxml/luaxml.pdf diff --git a/Master/texmf-dist/doc/luatex/luaxml/luaxml.tex b/Master/texmf-dist/doc/luatex/luaxml/luaxml.tex index 5031a0468e2..bf3b8fbaa74 100644 --- a/Master/texmf-dist/doc/luatex/luaxml/luaxml.tex +++ b/Master/texmf-dist/doc/luatex/luaxml/luaxml.tex @@ -7,7 +7,7 @@ \usepackage{framed} % Version is defined in the makefile, use default values when compiled directly \ifdefined\version\else -\def\version{v0.1r} +\def\version{v0.2} \let\gitdate\date \fi \newcommand\modulename[1]{\subsection{#1}\label{sec:#1}} @@ -99,6 +99,67 @@ end \end{luacode*} \end{framed} +\subsection{HTML parsing} + +You can parse HTML documents using the \verb|DOM_Object.html_parse| function. This parser is slower +than the default XML parser, but it can load files that would cause errors in the XML mode. +It can handle wrongly nested HTML tags, inline JavaScript and CSS styles, and other HTML features +that would cause XML errors. + +\begin{verbatim} +dom = require "luaxml-domobject" +local document = [[ +<html> +<head><title>sample</title></head> +<body> +<h1>test</h1> +<p>hello +<p>another paragraph +<ul> +<li>first +<li>second +</ul> +</body> +</html> + ]] + +-- dom.html_parse returns the DOM_Object +obj = dom.html_parse(document) +-- print names of all elements contained in body +for _, x in ipairs(obj:query_selector("body *")) do + tex.print(x:get_element_name().. "\\par") +end +\end{verbatim} + + +\begin{framed} +\begin{luacode*} +dom = require "luaxml-domobject" +local document = [[ +<html> +<head><title>sample</title></head> +<body> +<h1>test</h1> +<p>hello +<p>another paragraph +<ul> +<li>first +<li>second +</ul> +</body> +</html> + ]] + +-- dom.html_parse returns the DOM_Object +obj = dom.html_parse(document) +-- print names of all elements contained in body +for _, x in ipairs(obj:query_selector("body *")) do + tex.print(x:get_element_name().. "\\par") +end +\end{luacode*} +\end{framed} + + \subsection{Void elements} The \verb|DOM_Object.parse| function tries to support the HTML void elements, @@ -641,6 +702,35 @@ transform.print_tex("\\verb|" .. result .. "|") \end{luacode*} \end{framed} +\section{Character sets handling} + +The \texttt{luaxml-encodings} library provides functions to convert texts in legacy 8-bit encodings such as WINDOWS-1250 +or ISO-8859-2 to UTF-8. This can be useful in fixing document encoding before HTML parsing using the \texttt{luaxml-mod-html} +library. + +\subsection{Example} + + +\begin{verbatim} +kpse.set_program_name "luatex" +local encodings = require "luaxml-encodings" + +--read HTML page from the standard input +local text = io.read("*all") +-- find the character encoding in HTML metadata +local enc = encodings.find_html_encoding(text) +if enc then + -- local conversion table for the found encoding + local mapping = encodings.load_mapping(enc) + if mapping then + -- if the mapping exists, recode the HTML input and print it + local converted = encodings.recode(text, mapping) + print(converted) + end +end +\end{verbatim} + + \section{The API documentation} |