summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/pagelayout/scripts/pagelayoutapi.1
blob: 368e411ef7ba122c46d09f7b2ef363e0e3375ea2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "PAGELAYOUTAPI" "1" "January 2023" "" ""
.
.SH "NAME"
\fBpagelayoutapi\fR \- API for the pagelayout LaTeX class
.
.SH "SYNOPSIS"
\fBpagelayoutapi getwidth\fR % FILE
.
.P
\fBpagelayoutapi optimize\fR % FILE % FILENAME % EXTENSION % ORIGINALWIDTH % ORIGINALHEIGHT % CROPLEFT % CROPRIGHT % CROPTOP % CROPBOTTOM % DENSITY % WIDTH % HEIGHT % DOWNSAMPLETHRESHOLD % UNSHARP % QUALITY
.
.P
\fBpagelayoutapi makeshadow\fR % FILENAME % STANDARDDEVIATION % OPACITY % COLOR % WIDTH % HEIGHT % FRAMEWIDTH % FRAMEHEIGHT % MARGIN % BORDERRADIUS
.
.P
\fBpagelayoutapi start\fR [% import % [GRAPHICSPATH]] [% turbo % JOBNAME]
.
.P
\fBpagelayoutapi batchoptimize\fR % BATCHLIST
.
.SH "DESCRIPTION"
This script provides an API for the pagelayout LaTeX class\.
.
.TP
\fBpagelayoutapi getwidth\fR
Returns the width 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\.
.
.TP
\fBpagelayoutapi makeshadow\fR
Creates a shadow image and stores it in the cache directory\.
.
.TP
\fBpagelayoutapi start\fR
The import parameter triggers the image import (see pagelayout\-manual\.pdf chapter "Image Optimization")\. Running the command with the parameter turbo, where the jobname is the filename of the document, processes the document in a special batch mode, that creates a batch list and calls the command \fBpagelayoutapi batchoptimize\fR\.
.
.TP
\fBpagelayoutapi batchoptimize\fR
Optimizes multiple images in parallel\.
.
.SH "OPTIONS"
.
.TP
\fB\-\-help\fR
Prints a help message\.
.
.TP
\fB\-\-version\fR
Prints version information\.
.
.SH "PARAMETERS"
.
.TP
FILE
filename with extension (eg\. IMG1234\.JPEG)
.
.TP
FILENAME
filename without extension (eg\. IMG1234)
.
.TP
EXTENSION
optimized file extension (\.jpg|\.png)
.
.TP
DENSITY
density in ppi (eg\. 72)
.
.TP
DOWNSAMPLETHRESHOLD
downsample threshold (integer >= 100)
.
.TP
UNSHARP
unsharp filter (eg\. 2x1)
.
.TP
QUALITY
quality (integer > 0, <= 100)
.
.TP
STANDARDDEVIATION
standard deviation (decimal > 0\.0)
.
.TP
OPACITY
opacity (decimal >= 0\.0, <= 1\.0)
.
.TP
COLOR
color string (eg\. pink)
.
.TP
GRAPHICSPATH
list of directories (eg\. {images/}{tmp/})
.
.TP
JOBNAME
LaTeX filename without extension (eg\. my\-document)
.
.TP
BATCHLIST
a flat list of batch items where each batch item is a flat list of the 15 parameters required by the command `pagelayoutapi optimize`
.
.P
All other parameters are length dimensions\. The command \fBpagelayoutapi optimize\fR expects integer values in the LaTeX unit sp (eg\. 65536)\. The command \fBpagelayoutapi makeshadow\fR expects decimal values in a SVG compatible unit (eg\. 420\.0pt)\.
.
.SH "ENVIRONMENT"
\fBpagelayoutapi\fR requires ImageMagick 7\.0 or later and Inkscape 1\.0 or later\.
.
.TP
\fBPAGELAYOUT_IMPORT_DIRECTORY\fR
Defines a system wide import directory\.
.
.SH "AUTHOR"
\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\.