CTAN Comprehensive TeX Archive Network

CTAN update: stocksize

Date: January 2, 2026 8:30:21 PM CET
João M. Lourenço submitted an update to the stocksize package. Version: 2.0.1 2026-01-01 License: lppl1.3c Summary description: A flexible and easy interface to paper (stock) dimensions Announcement text:
Version 2.0.1 fixes the date and version number in the documentation. Version 2.0.0 introduces a major rewrite of the `stocksize` package. The update fundamentally changes the implementation to provide a more robust and reliable mechanism for managing nested page size changes. The key changes are: - Stack-Aware Geometry: Instead of a custom implementation, the package now patches `geometry`’s internal `\newgeometry` and `\restoregeometry` commands, making them operate as a true LIFO stack. This ensures that nested layout changes can be reliably restored in the correct order. - Automatic Physical Size Sync: The physical PDF page dimensions (e.g., `\pdfpagewidth`) are now automatically synchronized with the logical layout (`\paperwidth`) whenever the geometry is altered with the `\newstocksize{}` command. - New `patch-geometry` Option: A package option `[patch-geometry]` has been added to automatically synchronize the physical PDF page dimensions (e.g., `\pdfpagewidth`) and logical layout (`\paperwidth`) whenever the geometry is altered with the `\newgeometry{}` command.
The package’s Catalogue entry can be viewed at https://ctan.org/pkg/stocksize The package’s files themselves can be inspected at https://mirrors.ctan.org/macros/latex/contrib/stocksize/
Thanks for the upload. For the CTAN Team Petra Rübe-Pugliese
CTAN is run entirely by volunteers and supported by TeX user groups. Please join a user group or donate to one, see https://ctan.org/lugs

stocksize – A flexible and easy interface to paper (stock) dimensions

The package geometry is excellent for customizing the page layout. However, using the \newgeometry command to change the page size in the middle of the document only affects the typing area and does not affect the real paper (stock) size. This package circumvents this situation by resizing the paper (stock) size to the new page layout.

Packagestocksize
Version2.0.1 2026-01-01
Copyright2024–2026 João Lourenço
MaintainerJoão M. Lourenço

Announcements

more

Guest Book Sitemap Contact Contact Author