diff options
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/lualatex/luasseq/README | 7 | ||||
-rw-r--r-- | Master/texmf-dist/doc/lualatex/luasseq/luasseq.pdf | bin | 224059 -> 149438 bytes | |||
-rwxr-xr-x | Master/texmf-dist/scripts/luasseq/luasseq.lua | 26 | ||||
-rw-r--r-- | Master/texmf-dist/source/lualatex/luasseq/luasseq.dtx | 36 | ||||
-rw-r--r-- | Master/texmf-dist/tex/lualatex/luasseq/luasseq.sty | 4 |
5 files changed, 52 insertions, 21 deletions
diff --git a/Master/texmf-dist/doc/lualatex/luasseq/README b/Master/texmf-dist/doc/lualatex/luasseq/README index b6cb5d92040..4fab64cb278 100644 --- a/Master/texmf-dist/doc/lualatex/luasseq/README +++ b/Master/texmf-dist/doc/lualatex/luasseq/README @@ -1,6 +1,11 @@ -Version 2015-07-16 contains compatibility fixed for lualatex bundled with TeXLive 2014. +Version 2023-01-10 bug fixed and compatibility update for Lua language version 5.3+ (LuaTeX 1.15). + +Luasseq is a latex package for typesetting spectral sequences, a diagrammatic representation of a mathematical structure from homological algebra. + +Author: Tilman Bauer (tilman@alum.mit.edu) Required for use: luasseq.lua and luasseq.sty To get luasseq.sty: lualatex luasseq.ins (requires luasseq.dtx) To get the documentation luasseq.pdf: lualatex luasseq.dtx + diff --git a/Master/texmf-dist/doc/lualatex/luasseq/luasseq.pdf b/Master/texmf-dist/doc/lualatex/luasseq/luasseq.pdf Binary files differindex 6e487fcde6a..6ec110e375a 100644 --- a/Master/texmf-dist/doc/lualatex/luasseq/luasseq.pdf +++ b/Master/texmf-dist/doc/lualatex/luasseq/luasseq.pdf diff --git a/Master/texmf-dist/scripts/luasseq/luasseq.lua b/Master/texmf-dist/scripts/luasseq/luasseq.lua index 79082efce72..f0a34cd56bf 100755 --- a/Master/texmf-dist/scripts/luasseq/luasseq.lua +++ b/Master/texmf-dist/scripts/luasseq/luasseq.lua @@ -347,7 +347,7 @@ function sseq_drop_object(x,y,shape,pathusage,content,col) obj.wd,obj.ht = 262144,262144 obj.radius = 370727 else - obj.cmd = "\\pgfsetstrokecolor{%s}\\pgfsetfillcolor{white}"..string.format("\\pgfnode{%s}{center}{\\color{%%s}\\ensuremath{%s}}{}{\\pgfusepath{fill,%s}}",obj.nodetype,obj.code,pathusage) + obj.cmd = "\\pgfsetstrokecolor{%s}\\pgfsetfillcolor{white}\\pgfsetshapeinnerxsep{1pt}\\pgfsetshapeinnerysep{1pt}"..string.format("\\pgfnode{%s}{center}{\\color{%%s}\\ensuremath{%s}}{}{\\pgfusepath{fill,%s}}",obj.nodetype,obj.code,pathusage) tex.print (string.format("\\setbox%d=\\hbox{\\pgfinterruptpicture\\ensuremath{%s}\\endpgfinterruptpicture}",sseqboxno,obj.code)) tex.print("\\directlua0{sseq_register_size()}") end @@ -679,22 +679,22 @@ function sseq_correct_line_end(obj,fromx,fromy,curving) if obj.nodetype == "circle" then dist = math.sqrt(dirx*dirx + diry*diry) - return posx - obj.radius*(dirx)/dist, - posy - obj.radius*(diry)/dist + return math.floor(posx - obj.radius*(dirx)/dist), + math.floor(posy - obj.radius*(diry)/dist) else deltax = dirx/diry*obj.ht/2 -- no problem with infinity in LUA deltay = diry/dirx*obj.wd/2 if(math.abs(deltax) <= obj.wd/2) then -- boundary point on one of the horizontal lines if fromy > posy then - return posx + deltax, posy + obj.ht/2 + return math.floor(posx + deltax), math.floor(posy + obj.ht/2) else - return posx - deltax, posy - obj.ht/2 + return math.floor(posx - deltax), math.floor(posy - obj.ht/2) end else if fromx > posx then - return posx + obj.wd/2, posy + deltay + return math.floor(posx + obj.wd/2), math.floor(posy + deltay) else - return posx - obj.wd/2, posy - deltay + return math.floor(posx - obj.wd/2), math.floor(posy - deltay) end end end @@ -775,16 +775,20 @@ function sseq_dump_connection(conn) if fromobj then -- we have to be more careful where it ends fromx,fromy = sseq_correct_line_end(fromobj,tox,toy,conn.curving) + else + fromx,fromy = math.floor(fromx),math.floor(fromy) end if toobj then tox,toy = sseq_correct_line_end(toobj,fromx,fromy,conn.curving and -conn.curving) + else + tox,toy = math.floor(tox),math.floor(toy) end if conn.curving then - ctrlx = tox/2+fromx/2-conn.curving*(toy-fromy) - ctrly = toy/2+fromy/2+conn.curving*(tox-fromx) + ctrlx = math.floor(tox/2+fromx/2-conn.curving*(toy-fromy)) + ctrly = math.floor(toy/2+fromy/2+conn.curving*(tox-fromx)) end - + if conn.arrowfrom or conn.arrowto or conn.curving then -- got to use slow code tex.print("\\pgfsetdash{"..conn.dashing.."}{0pt}") tex.print("\\pgfsetstrokecolor{"..conn.color.."}") @@ -815,6 +819,7 @@ function sseq_dump_connection(conn) if (fromx and fromy) then if (tox and toy) then tex.print(string.format("\\pgfsys@moveto{%dsp}{%dsp}",fromx,fromy)) + tex.print(string.format("\\pgfsys@lineto{%dsp}{%dsp}",tox,toy)) tex.print("\\pgfsys@stroke") end @@ -878,6 +883,7 @@ function sseq_dump_code() end -- objects tex.print("\\color{white}") -- background fill color + tex.print("\\pgfsetdash{}{0pt}") -- reset dashing for x,ylist in pairs(sseqobject) do for y,olist in pairs(ylist) do for z,obj in ipairs(olist) do diff --git a/Master/texmf-dist/source/lualatex/luasseq/luasseq.dtx b/Master/texmf-dist/source/lualatex/luasseq/luasseq.dtx index 349ee9f9dfa..bee8c951202 100644 --- a/Master/texmf-dist/source/lualatex/luasseq/luasseq.dtx +++ b/Master/texmf-dist/source/lualatex/luasseq/luasseq.dtx @@ -3,7 +3,20 @@ % ^^A to produce the package file luasseq.sty. % ^^A Then LaTeX this file to produce the documentation of the luasseq package. % ^^A -% ^^A (c) 2003-2010 Tilman Bauer. Freely distributable under the LaTeX Project Public License (LPPL) +% ^^A This work may be distributed and/or modified under the +% ^^A onditions of the LaTeX Project Public License, either version 1.3 +% ^^A of this license or (at your option) any later version. +% ^^A The latest version of this license is in +% ^^A http://www.latex-project.org/lppl.txt +% ^^A and version 1.3 or later is part of all distributions of LaTeX +% ^^A version 2005/12/01 or later. +% +% ^^A This work has the LPPL maintenance status `maintained'. +% +% ^^A The Current Maintainer of this work is Tilman Bauer. +% +% ^^A This work consists of the files luasseq.dtx, luasseq.ins, and luasseq.lua +% ^^A and the derived files luasseq.sty and luasseq.pdf % ^^A % \ifthenelse{0=1}{ %<*never> @@ -28,11 +41,13 @@ % \changes{v1.06}{August 1, 2005}{sseqxstep=0 will now suppress printing of horizontal label; similarly sseqystep=0 and vertical labels} % \changes{v2.0a}{July 16, 2007}{Completely recoded the graphics for using pgf instead of xyPic. Many new features. Consult the manual.} % \changes{v2.0}{April 9, 2009}{bug fix with arrows leaving the chart} +% \changes{v2.2}{November 13, 2015}{compatibility fixes; new prefix system} +% \changes{v2023/01/10}{January 10, 2023}{compatibility fixes for current Lua version; bug fixes} % \ifthenelse{0=1}{ %<*package> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{luasseq}[2010/11/06 ver 2.1] +\ProvidesPackage{luasseq}[2023/01/10] \RequirePackage{ifthen,calc,pifont} \RequirePackage{pgf}[2006/01/01] @@ -57,7 +72,7 @@ % % \title{Typesetting spectral sequences in \LaTeX\ with luasseq.sty} % \author{Tilman Bauer\footnote{tilman@alum.mit.edu}} -% \date{November 6, 2010} +% \date{January 10, 2023} % % \MakeShortVerb{\|} % @@ -341,16 +356,19 @@ % \fi % % \DescribeMacro{\ssprefix} -% Often the mechanism provided by |\ssname|/|\ssgoto| is not flexible enough to deal with repeated code. In that case, |\ssprefix{|\meta{prefix}|}| defines a ``multiplier'' for all names that follow; i.e. a |\ssname{|\meta{name}|}| after such a command will really define a name \meta{prefix} \meta{name} (with a space in between, so that the order is irrelevant). However, since |\ssgoto| also observes the prefix, |\ssgoto{|\meta{name}|}| will still work. |\ssprefix| commands can be iterated; the prefices are then concatenated. +% \DescribeMacro{\ssbeginprefixcontext} +% \DescribeMacro{\ssendprefixcontext} +% \DescribeMacro{\ssresetprefix} +% Often the mechanism provided by |\ssname|/|\ssgoto| is not flexible enough to deal with repeated code. In that case, the prefix system can be used. |sseq| maintains a \emph{current prefix}, which is an unordered list of strings that is added to any name specified in |\ssname| or |\ssgoto|. For instance, if the current prefix is |a b|, then |\ssname{c}| will name the current element |a b c| (the order is irrelevant). % -% \iffalse -\newcommand{\ssprefix}[1]{\directlua0{sseq_prefix("#1")}} -% \fi +% To define a prefix, you first start a \emph{prefix context} with the command |\ssbeginprefixcontext|. After that, |\ssprefix{|\meta{name}|}| will add \meta{name} to the current prefix. |\ssprefix| can be issued repeatedly to add to the current prefix. After issuing |\ssendprefixcontext|, the prefix that was in effect at |\ssbeginprefixcontext| will be restored. (If no prefix was defined before, this will be the empty prefix.) |\ssbeginprefixcontext| and |\ssendprefixcontext| can be nested and provide a stack behavior. % -% \DescribeMacro{\ssresetprefix} -% This command resets the prefix defined by (a sequence of) |\ssprefix| to the empty prefix. +% There is an older behavior that still works for compatibility reasons. In the older system, the commands |\ssbeginprefixcontext| and |\ssendprefixcontext| are not used; instead, |\ssresetprefix| will reset the current prefix to the empty prefix. |\ssresetprefix| does not work in the new prefix system and will emit an error message. The two methods cannot be mixed. % % \iffalse +\newcommand{\ssprefix}[1]{\directlua0{sseq_prefix("#1")}} +\newcommand{\ssbeginprefixcontext}{\directlua0{sseq_begin_prefix_context()}} +\newcommand{\ssendprefixcontext}{\directlua0{sseq_end_prefix_context()}} \newcommand{\ssresetprefix}{\directlua0{sseq_reset_prefix()}} % \fi % diff --git a/Master/texmf-dist/tex/lualatex/luasseq/luasseq.sty b/Master/texmf-dist/tex/lualatex/luasseq/luasseq.sty index a7f3c625596..f2312b0e3bb 100644 --- a/Master/texmf-dist/tex/lualatex/luasseq/luasseq.sty +++ b/Master/texmf-dist/tex/lualatex/luasseq/luasseq.sty @@ -23,7 +23,7 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{luasseq}[2010/11/06 ver 2.1] +\ProvidesPackage{luasseq}[2023/01/10] \RequirePackage{ifthen,calc,pifont} \RequirePackage{pgf}[2006/01/01] @@ -120,6 +120,8 @@ \def\ssname#1{\directlua0{sseq_name("#1")}} \newcommand{\ssgoto}[1]{\directlua0{sseq_goto("#1")}} \newcommand{\ssprefix}[1]{\directlua0{sseq_prefix("#1")}} +\newcommand{\ssbeginprefixcontext}{\directlua0{sseq_begin_prefix_context()}} +\newcommand{\ssendprefixcontext}{\directlua0{sseq_end_prefix_context()}} \newcommand{\ssresetprefix}{\directlua0{sseq_reset_prefix()}} \newcommand{\ssabsgoto}[1]{\directlua0{sseq_abs_goto("#1")}} \define@key{sseqlabel}{color}{\def\sseq@color{#1}} |