summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'graphics')
-rw-r--r--graphics/pgf/contrib/pixelart/CHANGELOG.md13
-rw-r--r--graphics/pgf/contrib/pixelart/README.md4
-rw-r--r--graphics/pgf/contrib/pixelart/pixelart.lua26
-rw-r--r--graphics/pgf/contrib/pixelart/pixelart.pdfbin231203 -> 232668 bytes
-rw-r--r--graphics/pgf/contrib/pixelart/pixelart.sty18
-rw-r--r--graphics/pgf/contrib/pixelart/pixelart.tex6
-rw-r--r--graphics/pgf/contrib/pixelart/pixelart0.pdfbin152390 -> 152529 bytes
-rw-r--r--graphics/pstricks/contrib/luapstricks/luapstricks.lua23
8 files changed, 77 insertions, 13 deletions
diff --git a/graphics/pgf/contrib/pixelart/CHANGELOG.md b/graphics/pgf/contrib/pixelart/CHANGELOG.md
index daf7e7e726..ee5be079dd 100644
--- a/graphics/pgf/contrib/pixelart/CHANGELOG.md
+++ b/graphics/pgf/contrib/pixelart/CHANGELOG.md
@@ -1,3 +1,16 @@
+* pixelart 1.0.1 (2023-02-18)
+
+ * Bugs
+
+ * Minor change to take into account backward-incompatible change in `luakeys` v0.13.0 (thanks Jonathan P. Spratte).
+ * Pixelart (with option `square`) no longer fails when asked to draw an empty pixelart.
+
+ * Documentation
+
+ * Minor changes and improvements.
+
+ -- Louis Paternault <spalax@gresille.org>
+
* pixelart 1.0.0 (2022-11-16)
* Full, backward incompatible, rewrite of `pixelart`, in Lua.
diff --git a/graphics/pgf/contrib/pixelart/README.md b/graphics/pgf/contrib/pixelart/README.md
index 47eb31b3b6..fa717d9015 100644
--- a/graphics/pgf/contrib/pixelart/README.md
+++ b/graphics/pgf/contrib/pixelart/README.md
@@ -1,7 +1,7 @@
pixelart 🎨 A LaTeX package to draw pixel-art pictures
======================================================
-![Example](https://framagit.org/spalax/pixelart/-/raw/v1.0.0/pixelart.png)
+![Example](https://framagit.org/spalax/pixelart/-/raw/v1.0.1/pixelart.png)
- [Usage and installation instruction](http://mirrors.ctan.org/graphics/pgf/contrib/pixelart/pixelart.pdf).
- Example: The heart of the picture above was produced using the following code.
@@ -30,7 +30,7 @@ pixelart 🎨 A LaTeX package to draw pixel-art pictures
License
-------
-*Copyright 2018-2022 Louis Paternault*
+*Copyright 2017-2023 Louis Paternault*
This work may be distributed and/or modified under the conditions of the LaTeX
Project Public License, either version 1.3 of this license or (at your option)
diff --git a/graphics/pgf/contrib/pixelart/pixelart.lua b/graphics/pgf/contrib/pixelart/pixelart.lua
index 97a76d8f76..d5c98e3898 100644
--- a/graphics/pgf/contrib/pixelart/pixelart.lua
+++ b/graphics/pgf/contrib/pixelart/pixelart.lua
@@ -1,5 +1,23 @@
+--[[
+ Copyright 2017-2023 Louis Paternault
+
+ This work may be distributed and/or modified under the
+ conditions of the LaTeX Project Public License, either version 1.3
+ of this license or (at your option) any later version.
+ The latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+ and version 1.3 or later is part of all distributions of LaTeX
+ version 2005/12/01 or later.
+
+ This work has the LPPL maintenance status `maintained'.
+
+ The Current Maintainer of this work is Louis Paternault
+
+ This work consists of the files pixelart.sty, pixelart.lua, pixelart.tex.
+--]]
+
require("lualibs-lpeg")
-local luakeys = require("luakeys")
+local luakeys = require("luakeys")()
pixelart = {
_debug = false,
@@ -16,7 +34,6 @@ local function pixelart_setpixelartdebug(flag)
end
pixelart.setpixelartdebug = pixelart_setpixelartdebug
-pixelart.setpixelartdebug = pixelart_setpixelartdebug
--------------------------------------------------------------------------------
--[[ Print
@@ -269,6 +286,11 @@ end
local function pixelart_body_squares(array, colors, options)
-- Draw the tikz pixels, as a set of squares.
+ if #array == 0 then
+ -- Empty array
+ return
+ end
+
tex_print(string.format(
[[\clip ({0-%s}, {0-%s}) rectangle (%s, %s); ]],
options.margin,
diff --git a/graphics/pgf/contrib/pixelart/pixelart.pdf b/graphics/pgf/contrib/pixelart/pixelart.pdf
index 2a66d842aa..615676f083 100644
--- a/graphics/pgf/contrib/pixelart/pixelart.pdf
+++ b/graphics/pgf/contrib/pixelart/pixelart.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/pixelart/pixelart.sty b/graphics/pgf/contrib/pixelart/pixelart.sty
index 52b90e4afc..4fa15d8101 100644
--- a/graphics/pgf/contrib/pixelart/pixelart.sty
+++ b/graphics/pgf/contrib/pixelart/pixelart.sty
@@ -1,5 +1,21 @@
+%% Copyright 2017-2023 Louis Paternault
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Louis Paternault
+%%
+%% This work consists of the files pixelart.sty, pixelart.lua, pixelart.tex.
+
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{pixelart}
+\ProvidesPackage{pixelart}[2023/02/18 v1.0.1 A package to draw pixel-art pictures]
\RequirePackage{iftex}
\ifluatex
diff --git a/graphics/pgf/contrib/pixelart/pixelart.tex b/graphics/pgf/contrib/pixelart/pixelart.tex
index 1ab064ce56..bfcf1e5863 100644
--- a/graphics/pgf/contrib/pixelart/pixelart.tex
+++ b/graphics/pgf/contrib/pixelart/pixelart.tex
@@ -9,8 +9,8 @@
\setcnltx{
name = pixelart,
title = \pixelartlogo,
- version = v1.0.0,
- date = 2022-11-16,
+ version = v1.0.1,
+ date = 2023-02-18,
info = A \LaTeX{} package to draw pixel-art pictures ,
authors = Louis Paternault ,
email = spalax(at)gresille(dot)org ,
@@ -446,6 +446,8 @@ If you want to credit \pkg*{pixelart} in a fancy way, you can use one of those l
\end{commands}
\end{multicols}
+Note that those logos are affected by \cs{setpixelartdefault}, so, if you have used this command in your document, you might want to call \cs*{setpixelartdefault}\marg{} to reset the default options before drawing any logo.
+
\section{Debugging}
What if drawing your pixel art throws an error?
diff --git a/graphics/pgf/contrib/pixelart/pixelart0.pdf b/graphics/pgf/contrib/pixelart/pixelart0.pdf
index ec118f46fb..abd374878a 100644
--- a/graphics/pgf/contrib/pixelart/pixelart0.pdf
+++ b/graphics/pgf/contrib/pixelart/pixelart0.pdf
Binary files differ
diff --git a/graphics/pstricks/contrib/luapstricks/luapstricks.lua b/graphics/pstricks/contrib/luapstricks/luapstricks.lua
index 5482582d15..ee88e48993 100644
--- a/graphics/pstricks/contrib/luapstricks/luapstricks.lua
+++ b/graphics/pstricks/contrib/luapstricks/luapstricks.lua
@@ -18,8 +18,8 @@
if luatexbase then
luatexbase.provides_module {
name = 'luapstricks',
- version = 'v0.6',
- date = '2022-09-10',
+ version = 'v0.8',
+ date = '2023-02-17',
description = 'PSTricks backend for LuaLaTeX',
}
end
@@ -3016,11 +3016,16 @@ systemdict = {kind = 'dict', value = {
texio.write_nl('term and log', ps_to_string(operand_stack[i]))
end
end,
+ pstack = function()
+ for i=#operand_stack, 1, -1 do
+ texio.write_nl('term and log', ps_to_string(require'inspect'(operand_stack[i])))
+ end
+ end,
['='] = function()
texio.write_nl('term and log', ps_to_string(pop()))
end,
['=='] = function() -- FIXME: Should give a better representation
- texio.write_nl('term and log', ps_to_string(pop()))
+ texio.write_nl('term and log', require'inspect'((pop())))
end,
stringwidth = function()
@@ -3941,12 +3946,14 @@ local register_texbox do
local op = function()
flush_delayed()
local state = graphics_stack[#graphics_stack]
- local w, h, d = node.direct.dimensions(box.box)
+ local copied = node.direct.copy(box.box)
+ local w, h, d = node.direct.dimensions(copied)
register_point(state, 0, -d/65781.76)
register_point(state, w/65781.76, h/65781.76)
vf.push()
- vf.node(box.box)
+ vf.node(copied)
vf.pop()
+ node.direct.free(copied)
end
lua_node_lookup[op] = box
dict[id] = op
@@ -4155,7 +4162,11 @@ lua.get_functions_table()[func] = function()
local tokens = token.scan_argument(true)
if file then
context = tokens
- local f = io.open(kpse.find_file(tokens, 'PostScript header'), 'r')
+ local resolved, msg = kpse.find_file(tokens, 'PostScript header')
+ if not resolved then
+ return tex.error(string.format('luapstricks: Unable to open %q: %s', tokens, msg))
+ end
+ local f = io.open(resolved, 'r')
tokens = f:read'a'
f:close()
end