From: "Thomas A. Schmitz" <thomas.schmitz@uni-bonn.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Pagesize < papersize: Writing jobname/date outside page area
Date: Tue, 17 Apr 2007 23:27:11 +0200 [thread overview]
Message-ID: <A415439E-962D-406C-9200-E006D63E97E5@uni-bonn.de> (raw)
In-Reply-To: <4624CE2E.9080003@net-b.de>
On Apr 17, 2007, at 3:39 PM, Tobias Burnus wrote:
> Hello,
>
> I have pagesize < papersize and use crop marks. What I actually
> miss is
> the possibility to put text (Project name, date/time) outside the
> page.
> Currently, ConTeXt only prints there the colour bars, the page numbers
> and the crop marks.
>
> Example:
> http://glossary.ippaper.com/default.asp?req=glossary/term/
> 1972&catitemid=
>
> As a work around I currently misuse the footer, but I'm afraid that I
> will forget to remove it for the final version.
>
>
> (Just for curiosity and nothing I need: Does ConTeXt also support
> register marks?)
>
> Tobias
I'm not sure if this is what you're looking for, but I wrote a module
for my own use that has similar features. It's fairly brief, so I
just include the code here. It's used like this:
\usemodule[crop][Mark=Camera,Info=yes] It should be easy to modify
the definitions.
Best
Thomas
%%%%%%% module t-crop%%%%%%%
\startmodule[crop]
\unprotect
\setupmodule[Mark=Cross,Info=no]
\processaction[\currentmoduleparameter{Mark}]
[Camera=> \def\CropMark{Camera},
Cross=> \def\CropMark{Cross},
\v!unknown=> \def\CropMark{\relax},
\v!default=> \def\CropMark{Cross}]
\processaction[\currentmoduleparameter{Info}]
[yes=> \def\InfoMark{Info},
no=> \def\InfoMark{},
\v!unknown=> \def\InfoMark{},
\v!default=> \def\InfoMark{}]
\setupbackgrounds[page][background={\CropMark,\InfoMark}]
% We define names for the elements of our cropmarks.
\defineoverlay[Cross][\reuseMPgraphic{Cross}]
\defineoverlay[Camera][\reuseMPgraphic{Camera}]
\defineoverlay[Info][{\getbuffer[info]}]
\startbuffer[info]
\vbox to \paperheight \bgroup
\vskip -1 cm
\framed[frame=off,align=high]{\tt \tx "\jobname" - \currentdate
[y,/,mm,/,dd]\ - \currenttime\ - \realfolio\ of \lastpage}
\egroup
\stopbuffer
\startreusableMPgraphic{Cross}
StartPage;
%topleft
z5ctl = ulcorner Page ;
z6ctl = (x5ctl - 1cm,y5ctl) ;
z7ctl = (x5ctl + 1cm,y5ctl) ;
z8ctl = (x5ctl,y5ctl - 1cm) ;
z9ctl = (x5ctl,y5ctl + 1cm) ;
draw z6ctl--z7ctl ;
draw z8ctl--z9ctl ;
%topright
z5ctr = urcorner Page ;
z6ctr = (x5ctr - 1cm,y5ctr) ;
z7ctr = (x5ctr + 1cm,y5ctr) ;
z8ctr = (x5ctr,y5ctr - 1cm) ;
z9ctr = (x5ctr,y5ctr + 1cm) ;
draw z6ctr--z7ctr ;
draw z8ctr--z9ctr ;
%bottomright
z5cbr = lrcorner Page ;
z6cbr = (x5cbr - 1cm,y5cbr) ;
z7cbr = (x5cbr + 1cm,y5cbr) ;
z8cbr = (x5cbr,y5cbr - 1cm) ;
z9cbr = (x5cbr,y5cbr + 1cm) ;
draw z6cbr--z7cbr ;
draw z8cbr--z9cbr ;
%bottomleft
z5cbl = llcorner Page ;
z6cbl = (x5cbl - 1cm,y5cbl) ;
z7cbl = (x5cbl + 1cm,y5cbl) ;
z8cbl = (x5cbl,y5cbl - 1cm) ;
z9cbl = (x5cbl,y5cbl + 1cm) ;
draw z6cbl--z7cbl ;
draw z8cbl--z9cbl ;
\stopreusableMPgraphic
\startreusableMPgraphic{Camera}
StartPage;
%topleft
z5tl = ulcorner Page ;
z6tl = (x5tl - 0.2cm,y5tl) ;
z7tl = (x5tl - 1.2cm,y5tl) ;
z8tl = (x5tl - 0.8cm,y5tl) ;
z9tl = (x5tl - 1 cm,y5tl - 0.2cm) ;
z10tl = (x5tl - 1 cm,y5tl + 0.2cm) ;
draw z6tl--z7tl ;
draw z8tl..z9tl..z7tl..z10tl..cycle ;
draw z9tl--z10tl ;
z11tl = (x5tl,y5tl + 0.2cm) ;
z12tl = (x5tl,y5tl + 1.2cm) ;
z13tl = (x5tl,y5tl + 0.8cm) ;
z14tl = (x5tl - 0.2cm,y5tl + 1cm) ;
z15tl = (x5tl + 0.2cm,y5tl + 1cm) ;
draw z11tl--z12tl ;
draw z12tl..z14tl..z13tl..z15tl..cycle ;
draw z14tl--z15tl ;
%topright
z5tr = urcorner Page ;
z6tr = (x5tr + 0.2cm,y5tr) ;
z7tr = (x5tr + 1.2cm,y5tr) ;
z8tr = (x5tr + 0.8cm,y5tr) ;
z9tr = (x5tr + 1 cm,y5tr - 0.2cm) ;
z10tr = (x5tr + 1 cm,y5tr + 0.2cm) ;
draw z6tr--z7tr ;
draw z8tr..z9tr..z7tr..z10tr..cycle ;
draw z9tr--z10tr ;
z11tr = (x5tr,y5tr + 0.2cm) ;
z12tr = (x5tr,y5tr + 1.2cm) ;
z13tr = (x5tr,y5tr + 0.8cm) ;
z14tr = (x5tr - 0.2cm,y5tr + 1cm) ;
z15tr = (x5tr + 0.2cm,y5tr + 1cm) ;
draw z11tr--z12tr ;
draw z12tr..z14tr..z13tr..z15tr..cycle ;
draw z14tr--z15tr ;
%bottomleft
z5bl = llcorner Page ;
z6bl = (x5bl - 0.2cm,y5bl) ;
z7bl = (x5bl - 1.2cm,y5bl) ;
z8bl = (x5bl - 0.8cm,y5bl) ;
z9bl = (x5bl - 1 cm,y5bl - 0.2cm) ;
z10bl = (x5bl - 1 cm,y5bl + 0.2cm) ;
draw z6bl--z7bl ;
draw z8bl..z9bl..z7bl..z10bl..cycle ;
draw z9bl--z10bl ;
z11bl = (x5bl,y5bl - 0.2cm) ;
z12bl = (x5bl,y5bl - 1.2cm) ;
z13bl = (x5bl,y5bl - 0.8cm) ;
z14bl = (x5bl - 0.2cm,y5bl - 1cm) ;
z15bl = (x5bl + 0.2cm,y5bl - 1cm) ;
draw z11bl--z12bl ;
draw z12bl..z14bl..z13bl..z15bl..cycle ;
draw z14bl--z15bl ;
%bottomright
z5br = lrcorner Page ;
z6br = (x5br + 0.2cm,y5br) ;
z7br = (x5br + 1.2cm,y5br) ;
z8br = (x5br + 0.8cm,y5br) ;
z9br = (x5br + 1 cm,y5br - 0.2cm) ;
z10br = (x5br + 1 cm,y5br + 0.2cm) ;
draw z6br--z7br ;
draw z8br..z9br..z7br..z10br..cycle ;
draw z9br--z10br ;
z11br = (x5br,y5br - 0.2cm) ;
z12br = (x5br,y5br - 1.2cm) ;
z13br = (x5br,y5br - 0.8cm) ;
z14br = (x5br - 0.2cm,y5br - 1cm) ;
z15br = (x5br + 0.2cm,y5br - 1cm) ;
draw z11br--z12br ;
draw z12br..z14br..z13br..z15br..cycle ;
draw z14br--z15br ;
\stopreusableMPgraphic
\protect
\stopmodule
\endinput
next prev parent reply other threads:[~2007-04-17 21:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-17 13:39 Tobias Burnus
2007-04-17 21:27 ` Thomas A. Schmitz [this message]
2007-04-17 22:14 ` Tobias Burnus
2007-04-18 6:09 ` Hans Hagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=A415439E-962D-406C-9200-E006D63E97E5@uni-bonn.de \
--to=thomas.schmitz@uni-bonn.de \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).