Debian Codegraph @

texmf-dist/scripts/pagelayout/pagelayoutapi.1.md

raw
1 pagelayoutapi(1) -- API for the pagelayout LaTeX class
2 ====
3
4 ## SYNOPSIS
5
6 `pagelayoutapi getwidth` % FILE
7
8 `pagelayoutapi getheight` % FILE
9
10 `pagelayoutapi optimize` % FILE % FILENAME % EXTENSION % ORIGINALWIDTH % ORIGINALHEIGHT % CROPLEFT % CROPRIGHT % CROPTOP % CROPBOTTOM % DENSITY % WIDTH % HEIGHT % DOWNSAMPLETHRESHOLD % UNSHARP % QUALITY
11
12 `pagelayoutapi makeshadow` % FILENAME % STANDARDDEVIATION % OPACITY % COLOR % WIDTH % HEIGHT % FRAMEWIDTH % FRAMEHEIGHT % MARGIN % BORDERRADIUS
13
14 `pagelayoutapi start` [% import % [GRAPHICSPATH]] [% turbo % JOBNAME]
15
16 `pagelayoutapi batchoptimize` % BATCHLIST
17
18 ## DESCRIPTION
19
20 This script provides an API for the pagelayout LaTeX class.
21
22 * `pagelayoutapi getwidth`:
23 Returns the width in pixels for the given image file.
24
25 * `pagelayoutapi getheight`:
26 Returns the height in pixels for the given image file.
27
28 * `pagelayoutapi optimize`:
29 Creates a cropped, rezised, sharpend and compressed image and stores it in the cache directory.
30
31 * `pagelayoutapi makeshadow`:
32 Creates a shadow image and stores it in the cache directory.
33
34 * `pagelayoutapi start`:
35 The import parameter triggers the image import (see pagelayout-manual.pdf chapter "Image Optimization").
36 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 `pagelayoutapi batchoptimize`.
37
38 * `pagelayoutapi batchoptimize`:
39 Optimizes multiple images in parallel.
40
41 ## OPTIONS
42
43 * `--help`:
44 Prints a help message.
45 * `--version`:
46 Prints version information.
47
48 ## PARAMETERS
49
50 * FILE:
51 filename with extension (eg. IMG1234.JPEG)
52 * FILENAME:
53 filename without extension (eg. IMG1234)
54 * EXTENSION:
55 optimized file extension (.jpg|.png)
56 * DENSITY:
57 density in ppi (eg. 72)
58 * DOWNSAMPLETHRESHOLD:
59 downsample threshold (integer >= 100)
60 * UNSHARP:
61 unsharp filter (eg. 2x1)
62 * QUALITY:
63 quality (integer > 0, <= 100)
64 * STANDARDDEVIATION:
65 standard deviation (decimal > 0.0)
66 * OPACITY:
67 opacity (decimal >= 0.0, <= 1.0)
68 * COLOR:
69 color string (eg. pink)
70 * GRAPHICSPATH:
71 list of directories (eg. {images/}{tmp/})
72 * JOBNAME:
73 LaTeX filename without extension (eg. my-document)
74 * BATCHLIST:
75 a flat list of batch items where each batch item is a flat list of the 15 parameters required by the command \`pagelayoutapi optimize\`
76
77 All other parameters are length dimensions. The command `pagelayoutapi optimize` expects integer values in the LaTeX unit sp (eg. 65536). The command `pagelayoutapi makeshadow` expects decimal values in a SVG compatible unit (eg. 420.0pt).
78
79 ## ENVIRONMENT
80
81 `pagelayoutapi` requires ImageMagick 7.0 or later and Inkscape 1.0 or later.
82
83 * `PAGELAYOUT_IMPORT_DIRECTORY`:
84 Defines a system wide import directory.
85
86 ## AUTHOR
87
88 `pagelayoutapi` was written by Friedemann Bartels. <https://github.com/friedemannbartels>
89
90 ## LICENSE
91
92 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.