PAGELAYOUTAPI(1)
β¨ NAME β¨
okay bestie, welcome to pagelayoutapi(1) π it's the manual page for pagelayoutapi, an API for the pagelayout LaTeX class π
πΈ SYNOPSIS πΈ
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
pagelayoutapi start [% import % [GRAPHICSPATH]] [% turbo % JOBNAME]
pagelayoutapi batchoptimize % BATCHLIST
π DESCRIPTION π
okay so this script is basically the API for the pagelayout LaTeX class, and it's giving main character energy β¨
π getwidth
pagelayoutapi getwidth gives you back the width in pixels for the image file you point it at. Easy peasy π
π getheight
pagelayoutapi getheight gives you back the height in pixels for the image file you point it at π
π optimize
pagelayoutapi optimize makes a cropped, resized, sharpened and compressed image and stashes it in the cache directory. Literally so clean π§Όβ¨
π makeshadow
pagelayoutapi makeshadow makes a shadow image and tucks it away in the cache directory π
π start
okay this one is lowkey the most intense π₯ The import parameter triggers the image import (check the pagelayout-manual.pdf chapter "Image Optimization" for the tea β). Running the command with the parameter turbo, where the jobname is the filename of the document, processes the document in a special batch mode. It creates a batch list and then calls the command pagelayoutapi batchoptimize. Iconic π
π batchoptimize
pagelayoutapi batchoptimize optimizes multiple images in parallel. Multitasking queen behavior π
π¦ OPTIONS π¦
--helpβ prints a help message, for when you need a little guidance π--versionβ prints the version info π§
π PARAMETERS π
- FILE β the filename with its extension (eg.
IMG1234.JPEG) πΈ - FILENAME β the filename without the extension (eg.
IMG1234) π«Ά - EXTENSION β the optimized file extension (
.jpgor.png) πΌοΈ - DENSITY β the density in ppi (eg.
72) β¨ - DOWNSAMPLETHRESHOLD β the downsample threshold, an integer that has to be
>= 100π - UNSHARP β the unsharp filter (eg.
2x1) πͺ - QUALITY β the quality, an integer that has to be
> 0and<= 100π― - STANDARDDEVIATION β the standard deviation, a decimal that has to be
> 0.0π - OPACITY β the opacity, a decimal that has to be
>= 0.0and<= 1.0π«§ - COLOR β a color string (eg.
pink) π - GRAPHICSPATH β a list of directories (eg.
{images/}{tmp/}) π - JOBNAME β the LaTeX filename without the extension (eg.
my-document) π - BATCHLIST β a flat list of batch items, where each batch item is a flat list of the 15 parameters that the command
pagelayoutapi optimizeneeds π§Ύ
all the other parameters are length dimensions, so be careful with those units π The commandpagelayoutapi optimizeexpects integer values in the LaTeX unitsp(eg.65536). The commandpagelayoutapi makeshadowexpects decimal values in a SVG compatible unit (eg.420.0pt).
π ENVIRONMENT π
pagelayoutapi requires ImageMagick 7.0 or later and Inkscape 1.0 or later. No cap, you need those installed first π
- PAGELAYOUT_IMPORT_DIRECTORY β defines a system wide import directory π
π AUTHOR π
pagelayoutapi was written by Friedemann Bartels, the real MVP π«Ά You can find them at https://github.com/friedemannbartels
π§ 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. Sharing is caring π
okay bestie that's the whole tea ββ¨ this page was last updated in December 2023, so you're all caught up on PAGELAYOUTAPI(1) π¦π
π¦ where this page comes from
- arch rolling: texlive-doc 2026.1-1 Β· GPL
- debian trixie: texlive-latex-extra 2024.20250309-2
- fedora 44: texlive-pagelayout 12:svn71937-105.fc44 Β· LPPL-1.3c
- fedora 44: texlive-pagelayout 12:svn71937-111.fc44 Β· LPPL-1.3c
- opensuse-leap 16.0: texlive-pagelayout-doc 2025.221.1.1.1svn71937-160000.3.1 Β· LPPL-1.0
- ubuntu noble: texlive-latex-extra 2023.20240207-1
- ubuntu questing: texlive-latex-extra 2024.20250309-2
- ubuntu resolute: texlive-latex-extra 2025.20260124-1
- ubuntu stonking: texlive-latex-extra 2026.20260711-2
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms