Drawing crop marks

Last-Updated: 2021-08-30

Sources

Preliminary information

This macro is used to print crop marks (or cut marks) which are indicators for where to trim the paper once printed. You will see that this macro uses absolute motions, for details on how they work, please have a look at the section Absolute Motions in Chapter 15: Figures and Special Effects of the book Unix Text Processing which is linked in the Sources section.

Macro for crop marks

This macro (2008-12/msg00024) by Tadziu Hoffmann prints two perpendicular lines at each corner of the page. You should use the number register at the beginning of the macro to adapt it to the size of the paper you want -- right now it's aimed at A4 paper.

.nr TC 1.2c \" from top edge of paper
.nr LC 1.5c \" from left edge of text
.nr RC 19c  \" desired width
.nr BC 26c  \" desired height
.nr MC .5c  \" length of cut mark
.nr DC .2c  \" registration tolerance
.\" ----------------------------------------------------------------
.de CM
.ev cutmarks \" so we don't screw up the rest of the text
.vs 0
.in 0
\h'|-\\n(LCu-\\n(DCu'\v'|\\n(TCu'\D'l -\\n(MCu 0'
.br
\h'|-\\n(LCu'\v'|\\n(TCu-\\n(DCu'\D'l 0 -\\n(MCu'
.br
\h'|-\\n(LCu+\\n(RCu+\\n(DCu'\v'|\\n(TCu'\D'l \\n(MCu 0'
.br
\h'|-\\n(LCu+\\n(RCu'\v'|\\n(TCu-\\n(DCu'\D'l 0 -\\n(MCu'
.br
\h'|-\\n(LCu-\\n(DCu'\v'|\\n(TCu+\\n(BCu'\D'l -\\n(MCu 0'
.br
\h'|-\\n(LCu'\v'|\\n(TCu+\\n(DCu+\\n(BCu'\D'l 0 \\n(MCu'
.br
\h'|-\\n(LCu+\\n(RCu+\\n(DCu'\v'|\\n(TCu+\\n(BCu'\D'l \\n(MCu 0'
.br
\h'|-\\n(LCu+\\n(RCu'\v'|\\n(TCu+\\n(DCu+\\n(BCu'\D'l 0 \\n(MCu'
.br
.ev
..
.\" ----------------------------------------------------------------
.po 2.5c
.ll 16c
.\" ----------------------------------------------------------------
.sp 3c
Hello
.CM
world.