LaTeX-Package-Repositories / LaTeX-Package-Repositories/geometry

Feature request: Support trimming

Open
#7 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TeX
Stars
54
Forks
6
PR merge metrics
No merged PRs in 30d

Description

Background

Professional printshops are not restricted to «normal» paper formats the average user knows. They print on large sheets or rolls and cut the paper to the desired format later. This has a big advantage to the users: They can place graphic elements on the paper edge. For this to work the graphics must be slightly (2-5mm) larger. This area outside of the prospected end format is called bleed. There are special paper formats defined in ISO 217 for creating such documents. The better laser printers support those formats thus you can create trimmed documents up to A4 at home.

Status Quo

Currently I havn't seen support for creating trimmed documents. Even in the case when no trimming and bleed are desired this must be specified explicitely using the pdf page attribute /TrimBox. At least that is best practice but it's not done in LaTeX right now. In geometry, you also have to specify ISO 217 paper formats in mm instead of calling them by their name.

The boxes can be specified manually but it makes your code look ugly.

minimal example
\documentclass{article}

\pdfpageattr{
/MediaBox[0.0 0.0 609.4 864.6]
/BleedBox[0.0 0.0 609.4 864.6]%pt is the unit of measure
/TrimBox[14.17 11.34 595.3 853.2]
}

\begin{document}
Text.
\end{document}

creates a PDF for RA4 media that is intended to be trimmed to A4.

proposed solution

First we need two words for the uncropped and cropped paper. The option «paper» is a bit too general for me. «Medium» would be more specific.

\documentclass{article}
\usepackage[medium=RA4,trimmed=A4]{geometry}
\begin{document}
Text.
\end{document}

Much more elegant, isn't it?

other Info

While to specify a Trimbox is good practice, \TrimBox is mandatory for document compliance to PDF/X, whichever part of it. Mediabox must be present in any PDF document. It already is in pdfTeX. Bleedbox is optional but clearly indicated when Trimbox is not equal to Mediabox.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the geometry package's handling of paper-size options and PDF page attributes; the issue does not name a source file or test. Define how medium, trimmed, and bleed sizes should map to MediaBox, TrimBox, and BleedBox, then verify the minimal LaTeX example produces the intended PDF boxes.

Written by the indexing model from the issue text.

Assessment

Tech stack
latex
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.