diff options
author | Karl Berry <karl@freefriends.org> | 2023-02-19 01:54:06 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-02-19 01:54:06 +0000 |
commit | 502b5cc4665c49513a23e6a0df8fddf6e66f5422 (patch) | |
tree | 0b3983a2ba3b88f480df499c2a736061371620d5 /Master/texmf-dist/tex/latex | |
parent | 834276d40e0dad4fd632df86f2da1f13f2129b1f (diff) |
pixelart (19feb23) (branch)
git-svn-id: svn://tug.org/texlive/branches/branch2022.final@65899 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/pixelart/pixelart.lua | 26 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/pixelart/pixelart.sty | 18 |
2 files changed, 41 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/pixelart/pixelart.lua b/Master/texmf-dist/tex/latex/pixelart/pixelart.lua index 97a76d8f769..d5c98e3898c 100644 --- a/Master/texmf-dist/tex/latex/pixelart/pixelart.lua +++ b/Master/texmf-dist/tex/latex/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/Master/texmf-dist/tex/latex/pixelart/pixelart.sty b/Master/texmf-dist/tex/latex/pixelart/pixelart.sty index 52b90e4afc4..4fa15d8101b 100644 --- a/Master/texmf-dist/tex/latex/pixelart/pixelart.sty +++ b/Master/texmf-dist/tex/latex/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 |