PAGELAYOUTAPI(1)

πŸ“¦
version 71937 Β· 2 versions
  • 71937 Β· arch rolling, debian trixie, fedora 44, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 66392 Β· fedora 43
, in arch rolling, debian trixie, fedora 44, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ 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 (.jpg or .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 > 0 and <= 100 πŸ’―
  • STANDARDDEVIATION β€” the standard deviation, a decimal that has to be > 0.0 🌈
  • OPACITY β€” the opacity, a decimal that has to be >= 0.0 and <= 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 optimize needs 🧾
all the other parameters are length dimensions, so be careful with those units πŸ™ˆ 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).

🌈 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) πŸ¦‹πŸ’