groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Help with crop marks code


From: Clarke Echols
Subject: Re: [Groff] Help with crop marks code
Date: Thu, 28 Nov 2013 09:32:43 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121011 Thunderbird/16.0.1

Here's how I set up crop marks on an 8.5 x 11-inch sheet of paper for
10 business cards.  It's simple, works, and is easy to modify for other
uses.  I use \v and \l to produce the marks.

My Thunderbird emailer breaks lines over a certain width, so some lines
are continued on the next line (I think all of the botched lines are
comments with trailing asterisks on next line when it displays.  Your
results may or may not have the problem).

Just run and print it, and you can see how it works.

Clarke


.           \" SET CROP MARKS FOR ENTIRE SHEET OF 10 CARDS:
.\"
.\" Set top-outside crop marks:
.po 0.38i   \" Narrower left margin to center 7" card width on 8.5" page.
.sp |0.32i   \" Position top marks below top of sheet and print:
\l'0.3i'\v'-0.03i'\L'-0.3i'\h'7.00i'\L'0.3i'\v'0.03i'\l'0.3i'
.\" Set top-center mark:
.sp |0.32i
\h'3.814i'\v'-0.03i'\L'-0.3i'
.\" Set left- and right-side crop marks between card rows 1-2:
.sp |2.32i
\l'0.3i'\h'7.19i'\l'0.3i'
.\" Set left- and right-side crop marks between card rows 2-3:
.sp |4.32i
\l'0.3i'\h'7.19i'\l'0.3i'
.\" Set left- and right-side crop marks between card rows 3-4:
.sp |6.32i
\l'0.3i'\h'7.19i'\l'0.3i'
.\" Set left- and right-side crop marks between card rows 4-5:
.sp |8.32i
\l'0.3i'\h'7.19i'\l'0.3i'
.\" Set bottom-outside crop marks:
.sp |10.32i
\l'0.3i'\v'-0.03i'\L'0.3i'\h'7.00i'\L'-0.3i'\v'0.03i'\l'0.3i'
.\" Set bottom-center mark:
.sp |10.32i
\h'3.814i'\v'-0.03i'\L'0.3i'
.\" Set page offset to 3/4" for left side of sheet:
.po 4.18i
.ll 3.5i   \" Centering located at (page offset) plus half of (line length).
.\"
.\" **********************************************************************
.\" **********************************************************************
.\" ***                                                                ***
.\" ***   Crop marks are now complete.                                 ***
.\" ***                                                                ***
.\" ***   Each card is printed by pulling the text and layout          ***
.\" ***   information from an external file.                           ***
.\" ***                                                                ***
.\" ***   Page offset & starting vertical position are specified in    ***
.\" ***   this file, defining the upper-left corner of each card.      ***
.\" ***                                                                ***
.\" ***                                                                ***
.\" ***   Each card text-data file must define the layout of that      ***
.\" ***   particular card with all dimensioning, line length, etc.     ***
.\" ***   relative to the upper-left corner.                           ***
.\" ***                                                                ***
.\" ***                                                                ***
.\" **********************************************************************
.\" **********************************************************************


On 11/28/2013 08:08 AM, Walter Alejandro Iglesias wrote:
On Thu, Nov 28, 2013 at 02:46:52PM +0100, Steffen Daode Nurpmeso wrote:
The foldmark painter itself.
All it effectively does is to move absolutely and paint two
horizontal lines at precalculated positions; using different
absolute .sp in combination with several \D''s should do what you
desire?

I should have said it before, my knowledge with Groff is limited to some simple
macros I've wrote based on what I read in the gnu.org manuals.

I will read carefully and try what you sent me.  But at a first sight what is
new for me are the \D or \Z calls (used too by Ted H. in the link I posted).
Now I realize that those \D, \Z calls are some Groff basic drawing feature, and
are documented here:

https://www.gnu.org/software/groff/manual/html_node/Drawing-Requests.html

Now I have where to start :).


Many thanks Steffen for your help.


        Walter







reply via email to

[Prev in Thread] Current Thread [Next in Thread]