summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/pagelayout/scripts
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-12-22 03:02:07 +0000
committerNorbert Preining <norbert@preining.info>2023-12-22 03:02:07 +0000
commit49150e453072cff2c2ecaba1d1a55d8333d191d3 (patch)
treebd7e16e55839f6baf784320bb751d2892bcb88cc /macros/latex/contrib/pagelayout/scripts
parent838a56d5436e7e7e526d6dffe2461cf050643168 (diff)
CTAN sync 202312220302
Diffstat (limited to 'macros/latex/contrib/pagelayout/scripts')
-rwxr-xr-xmacros/latex/contrib/pagelayout/scripts/pagelayoutapi19
-rw-r--r--macros/latex/contrib/pagelayout/scripts/pagelayoutapi.111
-rw-r--r--macros/latex/contrib/pagelayout/scripts/pagelayoutapi.1.md5
-rwxr-xr-xmacros/latex/contrib/pagelayout/scripts/textestvis2
-rw-r--r--macros/latex/contrib/pagelayout/scripts/textestvis.14
5 files changed, 35 insertions, 6 deletions
diff --git a/macros/latex/contrib/pagelayout/scripts/pagelayoutapi b/macros/latex/contrib/pagelayout/scripts/pagelayoutapi
index 4c6888a249..7533cf722e 100755
--- a/macros/latex/contrib/pagelayout/scripts/pagelayoutapi
+++ b/macros/latex/contrib/pagelayout/scripts/pagelayoutapi
@@ -13,7 +13,7 @@
# LaTeX version 2008/05/04 or later.
#
-version=1.0.4
+version=1.0.5
_convert() {
turbo=$1
@@ -100,6 +100,17 @@ getwidth() {
fi
}
+getheight() {
+ if command -v magick >/dev/null 2>&1; then
+ filename=$1
+
+ originalheight=$( magick identify -ping -format %h "$filename" )
+ echo $originalheight
+ else
+ echo errormagicknotinstalled
+ fi
+}
+
optimize() {
if command -v magick >/dev/null 2>&1; then
filenamecache=$2
@@ -299,6 +310,7 @@ batchoptimize() {
usage() {
cat <<HELP_USAGE
usage: pagelayoutapi getwidth % FILE
+ pagelayoutapi getheight % FILE
pagelayoutapi optimize % FILE % FILENAME % EXTENSION % ORIGINALWIDTH
% ORIGINALHEIGHT % CROPLEFT % CROPRIGHT % CROPTOP % CROPBOTTOM
% DENSITY % WIDTH % HEIGHT % DOWNSAMPLETHRESHOLD % UNSHARP % QUALITY
@@ -327,6 +339,11 @@ getwidth)
getwidth "$1"
;;
+getheight)
+ shift
+
+ getheight "$1"
+ ;;
optimize)
shift
diff --git a/macros/latex/contrib/pagelayout/scripts/pagelayoutapi.1 b/macros/latex/contrib/pagelayout/scripts/pagelayoutapi.1
index 368e411ef7..dab9b89f1c 100644
--- a/macros/latex/contrib/pagelayout/scripts/pagelayoutapi.1
+++ b/macros/latex/contrib/pagelayout/scripts/pagelayoutapi.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "PAGELAYOUTAPI" "1" "January 2023" "" ""
+.TH "PAGELAYOUTAPI" "1" "December 2023" "" ""
.
.SH "NAME"
\fBpagelayoutapi\fR \- API for the pagelayout LaTeX class
@@ -10,6 +10,9 @@
\fBpagelayoutapi getwidth\fR % FILE
.
.P
+\fBpagelayoutapi getheight\fR % FILE
+.
+.P
\fBpagelayoutapi optimize\fR % FILE % FILENAME % EXTENSION % ORIGINALWIDTH % ORIGINALHEIGHT % CROPLEFT % CROPRIGHT % CROPTOP % CROPBOTTOM % DENSITY % WIDTH % HEIGHT % DOWNSAMPLETHRESHOLD % UNSHARP % QUALITY
.
.P
@@ -29,6 +32,10 @@ This script provides an API for the pagelayout LaTeX class\.
Returns the width in pixels for the given image file\.
.
.TP
+\fBpagelayoutapi getheight\fR
+Returns the height in pixels for the given image file\.
+.
+.TP
\fBpagelayoutapi optimize\fR
Creates a cropped, rezised, sharpend and compressed image and stores it in the cache directory\.
.
@@ -122,4 +129,4 @@ Defines a system wide import directory\.
\fBpagelayoutapi\fR was written by Friedemann Bartels\. \fIhttps://github\.com/friedemannbartels\fR
.
.SH "LICENSE"
-Copyright (c) 2022-2023 Friedemann Bartels\. Free use of this software is granted under the terms of the LaTeX Project Public License version 1\.3c or later\.
+Copyright (c) 2022\-2023 Friedemann Bartels\. Free use of this software is granted under the terms of the LaTeX Project Public License version 1\.3c or later\.
diff --git a/macros/latex/contrib/pagelayout/scripts/pagelayoutapi.1.md b/macros/latex/contrib/pagelayout/scripts/pagelayoutapi.1.md
index ab04ddd0b8..881554a124 100644
--- a/macros/latex/contrib/pagelayout/scripts/pagelayoutapi.1.md
+++ b/macros/latex/contrib/pagelayout/scripts/pagelayoutapi.1.md
@@ -5,6 +5,8 @@ pagelayoutapi(1) -- API for the pagelayout LaTeX class
`pagelayoutapi getwidth` % FILE
+`pagelayoutapi getheight` % FILE
+
`pagelayoutapi optimize` % FILE % FILENAME % EXTENSION % ORIGINALWIDTH % ORIGINALHEIGHT % CROPLEFT % CROPRIGHT % CROPTOP % CROPBOTTOM % DENSITY % WIDTH % HEIGHT % DOWNSAMPLETHRESHOLD % UNSHARP % QUALITY
`pagelayoutapi makeshadow` % FILENAME % STANDARDDEVIATION % OPACITY % COLOR % WIDTH % HEIGHT % FRAMEWIDTH % FRAMEHEIGHT % MARGIN % BORDERRADIUS
@@ -20,6 +22,9 @@ This script provides an API for the pagelayout LaTeX class.
* `pagelayoutapi getwidth`:
Returns the width in pixels for the given image file.
+* `pagelayoutapi getheight`:
+ Returns the height in pixels for the given image file.
+
* `pagelayoutapi optimize`:
Creates a cropped, rezised, sharpend and compressed image and stores it in the cache directory.
diff --git a/macros/latex/contrib/pagelayout/scripts/textestvis b/macros/latex/contrib/pagelayout/scripts/textestvis
index dba5e4c1aa..53dcedddca 100755
--- a/macros/latex/contrib/pagelayout/scripts/textestvis
+++ b/macros/latex/contrib/pagelayout/scripts/textestvis
@@ -13,7 +13,7 @@
# LaTeX version 2008/05/04 or later.
#
-version=1.0.4
+version=1.0.5
OK="$( tput setaf 2 )•$( tput sgr0 )"
FAILED="$( tput setaf 1 )$( tput bold )x$( tput sgr0 )"
diff --git a/macros/latex/contrib/pagelayout/scripts/textestvis.1 b/macros/latex/contrib/pagelayout/scripts/textestvis.1
index 7f7b7df740..69ed008f7d 100644
--- a/macros/latex/contrib/pagelayout/scripts/textestvis.1
+++ b/macros/latex/contrib/pagelayout/scripts/textestvis.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "TEXTESTVIS" "1" "January 2023" "" ""
+.TH "TEXTESTVIS" "1" "December 2023" "" ""
.
.SH "NAME"
\fBtextestvis\fR \- visual regression tests for LaTeX
@@ -70,4 +70,4 @@ Prints version information\.
\fBtextestvis\fR was written by Friedemann Bartels\. \fIhttps://github\.com/friedemannbartels\fR
.
.SH "LICENSE"
-Copyright (c) 2022-2023 Friedemann Bartels\. Free use of this software is granted under the terms of the LaTeX Project Public License version 1\.3c or later\.
+Copyright (c) 2022\-2023 Friedemann Bartels\. Free use of this software is granted under the terms of the LaTeX Project Public License version 1\.3c or later\.