diff options
author | Norbert Preining <norbert@preining.info> | 2024-01-22 03:01:00 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2024-01-22 03:01:00 +0000 |
commit | 3bb554642b743cd7ca7aef2b3668604343bfe708 (patch) | |
tree | 1de1c87f5181a1d269c0f94e332181e000b1489d /support | |
parent | b2fc73208c72c65ca8f9ce068898291b69322d32 (diff) |
CTAN sync 202401220300
Diffstat (limited to 'support')
-rw-r--r-- | support/ppmcheck/ppmcheck.pdf | bin | 25186 -> 0 bytes | |||
-rw-r--r-- | support/ppmcheckpdf/README.txt (renamed from support/ppmcheck/README) | 2 | ||||
-rw-r--r-- | support/ppmcheckpdf/ppmcheckpdf.lua (renamed from support/ppmcheck/ppmcheck.lua) | 12 | ||||
-rw-r--r-- | support/ppmcheckpdf/ppmcheckpdf.pdf | bin | 0 -> 25067 bytes | |||
-rw-r--r-- | support/ppmcheckpdf/ppmcheckpdf.tex (renamed from support/ppmcheck/ppmcheck.tex) | 24 |
5 files changed, 19 insertions, 19 deletions
diff --git a/support/ppmcheck/ppmcheck.pdf b/support/ppmcheck/ppmcheck.pdf Binary files differdeleted file mode 100644 index 854d76202a..0000000000 --- a/support/ppmcheck/ppmcheck.pdf +++ /dev/null diff --git a/support/ppmcheck/README b/support/ppmcheckpdf/README.txt index b0eba88d48..daf87bd3d0 100644 --- a/support/ppmcheck/README +++ b/support/ppmcheckpdf/README.txt @@ -1,4 +1,4 @@ Package: Convert PDF to PNG and compare PNG files after l3build Author: Jianrui Lyu <tolvjr@163.com> -Repository: https://github.com/lvjr/ppmcheck +Repository: https://github.com/lvjr/ppmcheckpdf License: The LaTeX Project Public License 1.3c diff --git a/support/ppmcheck/ppmcheck.lua b/support/ppmcheckpdf/ppmcheckpdf.lua index 1691b9ee57..5885e5f012 100644 --- a/support/ppmcheck/ppmcheck.lua +++ b/support/ppmcheckpdf/ppmcheckpdf.lua @@ -2,11 +2,11 @@ -- Description: Convert PDF to PNG and compare PNG files after l3build -- Copyright: 2024 (c) Jianrui Lyu <tolvjr@163.com> --- Repository: https://github.com/lvjr/ppmcheck +-- Repository: https://github.com/lvjr/ppmcheckpdf -- License: The LaTeX Project Public License 1.3c -ppmcheck_version = "2024A" -ppmcheck_date = "2024-01-18" +ppmcheckpdf_version = "2024B" +ppmcheckpdf_date = "2024-01-21" -------------------------------------------- ---- source code from l3build.lua @@ -101,7 +101,7 @@ local function saveimgmd5(imgname, md5file, newmd5) writefile(md5file, newmd5) end -local function ppmcheck(job) +local function ppmcheckpdf(job) local errorlevel local imgname = job .. imgext local md5file = testfiledir .. "/" .. job .. ".md5" @@ -148,11 +148,11 @@ local function main() rm(testdir, imgname) end ren(testdir, imgfiles[1], imgname) - local e = ppmcheck(jobname(v)) or 0 + local e = ppmcheckpdf(jobname(v)) or 0 errorlevel = errorlevel + e else for _, i in ipairs(imgfiles) do - local e = ppmcheck(jobname(i)) or 0 + local e = ppmcheckpdf(jobname(i)) or 0 errorlevel = errorlevel + e end end diff --git a/support/ppmcheckpdf/ppmcheckpdf.pdf b/support/ppmcheckpdf/ppmcheckpdf.pdf Binary files differnew file mode 100644 index 0000000000..6a893fa85b --- /dev/null +++ b/support/ppmcheckpdf/ppmcheckpdf.pdf diff --git a/support/ppmcheck/ppmcheck.tex b/support/ppmcheckpdf/ppmcheckpdf.tex index d76a9e4534..8b32a8259e 100644 --- a/support/ppmcheck/ppmcheck.tex +++ b/support/ppmcheckpdf/ppmcheckpdf.tex @@ -2,7 +2,7 @@ \documentclass[oneside,12pt]{article} \usepackage[a4paper,margin=2cm]{geometry} -\newcommand*{\myversion}{2024A} +\newcommand*{\myversion}{2024B} \newcommand*{\mydate}{Version \myversion\ (\the\year-\mylpad\month-\mylpad\day)} \newcommand*{\mylpad}[1]{\ifnum#1<10 0\the#1\else\the#1\fi} @@ -26,12 +26,12 @@ \begin{document} \title{\sffamily - \textcolor{green3}{The \texttt{ppmcheck} tool}\\ + \textcolor{green3}{The \texttt{ppmcheckpdf} tool}\\ {\large Convert PDF to PNG and compare PNG files after \texttt{l3build}}% } \author{% Jianrui Lyu (tolvjr@163.com)% - %\\\url{https://github.com/lvjr/ppmcheck} + %\\\url{https://github.com/lvjr/ppmcheckpdf} } \date{\mydate} \maketitle @@ -42,18 +42,18 @@ to corresponding \myfile{.tlg} files. Sometimes \LaTeX{} kernel or some package depends on adds a whatisit or \mycmd{\kern0pt}, and your test files will fail even if the PDF files look the same as before and are still correct. -This \mypkg{ppmcheck} tool provides an alternative way for regression testing: +This \mypkg{ppmcheckpdf} tool provides an alternative way for regression testing: Instead of printing box contents in \myfile{.lvt} files, you could just convert PDF files to PNG files and compare PNG files after \mypkg{l3build} finishes its job. \section{Installation} -Normally your TeX distribution will copy \myfile{ppmcheck.lua} file to the correct folder +Normally your TeX distribution will copy \myfile{ppmcheckpdf.lua} file to the correct folder when you install this tool. If a manual installation is needed, you could download -\href{https://ctan.org/pkg/ppmcheck}{\myfile{ppmcheck.lua}} -from CTAN and install it to \myfile{TEXMF/scripts/ppmcheck/ppmcheck.lua}. +\href{https://ctan.org/pkg/ppmcheckpdf}{\myfile{ppmcheckpdf.lua}} +from CTAN and install it to \myfile{TEXMF/scripts/ppmcheckpdf/ppmcheckpdf.lua}. -The \mypkg{ppmcheck} tool uses \myprg{pdftoppm} program for image converting. +The \mypkg{ppmcheckpdf} tool uses \myprg{pdftoppm} program for image converting. This program is installed by default on MiKTeX. For TeX Live, you can install it by running \begin{codehigh} tlmgr install wintools.windows @@ -70,7 +70,7 @@ First create a \myfile{buildend.lua} file with the following lines in the folder (next to \myfile{build.lua} file for \mypkg{l3build}): \begin{codehigh} kpse.set_program_name("kpsewhich") -dofile(kpse.lookup("ppmcheck.lua")) +dofile(kpse.lookup("ppmcheckpdf.lua")) \end{codehigh} Then you could run the folllowing commands \begin{codehigh} @@ -78,10 +78,10 @@ l3build check texlua buildend.lua \end{codehigh} -The first run of \mypkg{ppmcheck} will save image and md5 files to \myfile{testfiles} folder, +The first run of \mypkg{ppmcheckpdf} will save image and md5 files to \myfile{testfiles} folder, and the subsequent runs of it will compare new md5 values with existing md5 values. -You could force \mypkg{ppmcheck} to save new image and md5 files to \myfile{testfiles} folder +You could force \mypkg{ppmcheckpdf} to save new image and md5 files to \myfile{testfiles} folder by passing \myopt{save} option to it: \begin{codehigh} l3build check @@ -91,7 +91,7 @@ texlua buildend.lua save \section{Customizations} The \myprg{pdftoppm} program supports several types of image files. -By default the \mypkg{ppmcheck} tool will use \myfile{.png} file, +By default the \mypkg{ppmcheckpdf} tool will use \myfile{.png} file, and you could change it in \myfile{build.lua} file like this: \begin{codehigh} imgext = ".ppm" |