texlive[65511] Master/texmf-dist: luasseq (10jan23)

commits+karl at tug.org commits+karl at tug.org
Tue Jan 10 22:18:11 CET 2023


Revision: 65511
          http://tug.org/svn/texlive?view=revision&revision=65511
Author:   karl
Date:     2023-01-10 22:18:10 +0100 (Tue, 10 Jan 2023)
Log Message:
-----------
luasseq (10jan23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/lualatex/luasseq/README
    trunk/Master/texmf-dist/doc/lualatex/luasseq/luasseq.pdf
    trunk/Master/texmf-dist/scripts/luasseq/luasseq.lua
    trunk/Master/texmf-dist/source/lualatex/luasseq/luasseq.dtx
    trunk/Master/texmf-dist/tex/lualatex/luasseq/luasseq.sty

Modified: trunk/Master/texmf-dist/doc/lualatex/luasseq/README
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/luasseq/README	2023-01-10 21:17:26 UTC (rev 65510)
+++ trunk/Master/texmf-dist/doc/lualatex/luasseq/README	2023-01-10 21:18:10 UTC (rev 65511)
@@ -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 at 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
+

Modified: trunk/Master/texmf-dist/doc/lualatex/luasseq/luasseq.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/scripts/luasseq/luasseq.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/luasseq/luasseq.lua	2023-01-10 21:17:26 UTC (rev 65510)
+++ trunk/Master/texmf-dist/scripts/luasseq/luasseq.lua	2023-01-10 21:18:10 UTC (rev 65511)
@@ -347,7 +347,7 @@
 		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 @@
 	
 	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 @@
 	
 	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 @@
 		if (fromx and fromy) then
 			if (tox and toy) then
 				tex.print(string.format("\\pgfsys at moveto{%dsp}{%dsp}",fromx,fromy))
+				
 				tex.print(string.format("\\pgfsys at lineto{%dsp}{%dsp}",tox,toy))
 				tex.print("\\pgfsys at stroke")
 			end
@@ -878,6 +883,7 @@
 	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

Modified: trunk/Master/texmf-dist/source/lualatex/luasseq/luasseq.dtx
===================================================================
--- trunk/Master/texmf-dist/source/lualatex/luasseq/luasseq.dtx	2023-01-10 21:17:26 UTC (rev 65510)
+++ trunk/Master/texmf-dist/source/lualatex/luasseq/luasseq.dtx	2023-01-10 21:18:10 UTC (rev 65511)
@@ -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 at 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
 %

Modified: trunk/Master/texmf-dist/tex/lualatex/luasseq/luasseq.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/luasseq/luasseq.sty	2023-01-10 21:17:26 UTC (rev 65510)
+++ trunk/Master/texmf-dist/tex/lualatex/luasseq/luasseq.sty	2023-01-10 21:18:10 UTC (rev 65511)
@@ -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 at key{sseqlabel}{color}{\def\sseq at color{#1}}



More information about the tex-live-commits mailing list.