Received: via tmail-4.1(11) (invoked by user schoepf) for schoepf; Tue, 7 Mar 2000 10:19:23 +0100 (MET) Received: from mailgate2.zdv.Uni-Mainz.DE (mailgate2.zdv.Uni-Mainz.DE [134.93.8.57]) by mail.Uni-Mainz.DE (8.9.3/8.9.3) with ESMTP id KAA23570 for ; Tue, 7 Mar 2000 10:19:23 +0100 (MET) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01BF8816.39CC1F80" Received: from mail.listserv.gmd.de (mail.listserv.gmd.de [192.88.97.5]) by mailgate2.zdv.Uni-Mainz.DE (8.9.3/8.9.3) with ESMTP id KAA27770 for ; Tue, 7 Mar 2000 10:19:22 +0100 (MET) Received: from mail.listserv.gmd.de (192.88.97.5) by mail.listserv.gmd.de (LSMTP for OpenVMS v1.1a) with SMTP id <1.E32341E1@mail.listserv.gmd.de>; Tue, 7 Mar 2000 10:18:03 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5 Received: from RELAY.URZ.UNI-HEIDELBERG.DE by RELAY.URZ.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 1.8b) with spool id 451898 for LATEX-L@RELAY.URZ.UNI-HEIDELBERG.DE; Tue, 7 Mar 2000 10:16:40 +0100 Received: from ix.urz.uni-heidelberg.de (mail.urz.uni-heidelberg.de [129.206.119.234]) by relay.urz.uni-heidelberg.de (8.8.8/8.8.8) with ESMTP id KAA22262 for ; Tue, 7 Mar 2000 10:16:39 +0100 (MET) Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by ix.urz.uni-heidelberg.de (8.8.8/8.8.8) with ESMTP id KAA20582 for ; Tue, 7 Mar 2000 10:19:16 +0100 Received: from waldorf.cs.uni-dortmund.de (waldorf.cs.uni-dortmund.de [129.217.4.42]) by relay.uni-heidelberg.de (8.9.3+Sun/8.9.3) with ESMTP id KAA13830 for ; Tue, 7 Mar 2000 10:16:38 +0100 (MET) Received: from goedel.cs.uni-dortmund.de (goedel.cs.uni-dortmund.de [129.217.28.168]) by waldorf.cs.uni-dortmund.de with ESMTP id KAA12546 for ; Tue, 7 Mar 2000 10:19:16 +0100 (MET) Received: from goedel (localhost [127.0.0.1]) by goedel.cs.uni-dortmund.de id KAA10263; Tue, 7 Mar 2000 10:19:16 +0100 (MET) In-Reply-To: Your message of "Mon, 06 Mar 2000 22:05:01 GMT." <200003062205.WAA14050@nag.co.uk> Return-Path: X-Mailer: exmh version 2.0.2 2/24/98 x-vm-v5-data: ([nil nil nil nil nil nil nil nil nil]["2635" "Tue" "7" "March" "2000" "10:19:16" "+0100" "Karsten Tinnefeld" "tinne@NOETHER.CS.UNI-DORTMUND.DE" nil "81" "Re: bop-hook" "^Date:" nil nil "3" nil nil nil nil nil]nil) Content-class: urn:content-classes:message Subject: Re: bop-hook Date: Tue, 7 Mar 2000 10:19:16 +0100 Message-ID: <200003070919.KAA10263@goedel.cs.uni-dortmund.de> X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Karsten Tinnefeld" Sender: "Mailing list for the LaTeX3 project" To: "Multiple recipients of list LATEX-L" Reply-To: "Mailing list for the LaTeX3 project" Status: R X-Status: X-Keywords: X-UID: 3548 This is a multi-part message in MIME format. ------_=_NextPart_001_01BF8816.39CC1F80 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable > > I do not want to have the code in a package. This would > > result in a patch. A hook wouldn't blow the kernel up, the begin > > document hook is only a few lines of code. > > even if it was 1 line of code (which actually it is as there is a = begin > page hook, but it disables itself after the first time, so it can be > advertised as \AtBeginDvi) you would want it as a package. Code like this has been lying around here for a while. Find below my bophook.sty and a test file that marks the boundaries in DIN letters. \def\filedate{2000/03/07} \def\fileversion{0.01} \def\filename{bophook} \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{\filename}[\filedate\space v\fileversion\space bop-hook, K. Tinnefeld] % PageLayout should contain margin- and textdimen. settings, % e. g. changed in the ps@xxx commands. \newcommand*{\PageLayout}[1]{\gdef\@pagelayout{#1}} \newcommand*{\AtBeginPage}[1]{\gdef\@originpic{#1}} \let \@pagelayout \relax \let \@originpic \relax \CheckCommand*\@begindvi{% \unvbox \@begindvibox \global\let \@begindvi \@empty} \renewcommand*\@begindvi{% \unvbox \@begindvibox \@originprint \global\let \@begindvi \@originprint} \newcommand*{\@originprint}{% \setbox\@tempboxa\vbox to\z@{% \vskip-1in \moveleft1in \vbox{% \hb@xt@\z@{% \@originpic\hss}}\vss} \dp\@tempboxa\z@ \box\@tempboxa \@pagelayout} \endinput \documentclass[a4paper, oneside]{letter} \usepackage{bophook} \PageLayout{% \newlength{\topdist} \setlength{\topdist}{\topmargin} \addtolength{\topdist}{\headheight} \newlength{\sidedist} \setlength{\sidedist}{\oddsidemargin}} \newcommand*{\color}[1]{} \AtBeginPage{% \unitlength1mm \begin{picture}(0,0) \put(105,-22.5){\makebox(0,0){\Large Brief nach DIN 676 B--A4 = (1995--05)}} \put(0,-45){\line(1,0){210}} \put(20,-50){\line(1,0){85}} \put(20,-90){\line(1,0){85}} \put(20,-45){\line(0,-1){45}} \put(105,-45){\line(0,-1){45}} \put(0,-98.5){\line(1,0){210}} \put(24,-98.5){\line(0,-1){173.1}} \put(74.8,-98.5){\line(0,-1){20}} \put(125.6,-98.5){\line(0,-1){20}} \put(176.4,-98.5){\line(0,-1){20}} %%% Faltmarken \put(0,-105){\line(1,0){10}} \put(0,-210){\line(1,0){10}} %%% Lochermarke \put(10,-148.5){\line(1,0){10}} \end{picture}} \newenvironment{brief}{% \ignorespacesafterend}{} \begin{document} \begin{brief} \makebox{} \end{brief} \end{document} -- Karsten Tinnefeld tinnefeld@ls2.cs.uni-dortmund.de Fachbereich Informatik, Lehrstuhl 2 T +49 231 755-4737 Universit=E4t Dortmund, D-44221 Dortmund, Deutschland F +49 231 = 755-2047 ------_=_NextPart_001_01BF8816.39CC1F80 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Re: bop-hook

> >  I do not want to have the code in a = package.  This would
> > result in a patch.  A hook wouldn't = blow the kernel up, the begin
> > document hook is only a few lines of = code.
>
> even if it was 1 line of code (which actually it = is as there is a begin
> page hook, but it disables itself after the = first time, so it can be
> advertised as \AtBeginDvi) you would want it as = a package.

Code like this has been lying around here for a while. = Find below my
bophook.sty and a test file that marks the boundaries = in DIN letters.

\def\filedate{2000/03/07}
\def\fileversion{0.01}
\def\filename{bophook}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{\filename}[\filedate\space = v\fileversion\space
  bop-hook, K. Tinnefeld]
% PageLayout should contain margin- and textdimen. = settings,
% e. g. changed in the ps@xxx commands.
\newcommand*{\PageLayout}[1]{\gdef\@pagelayout{#1}}
\newcommand*{\AtBeginPage}[1]{\gdef\@originpic{#1}}
\let \@pagelayout \relax
\let \@originpic \relax
\CheckCommand*\@begindvi{%
  \unvbox \@begindvibox
  \global\let \@begindvi \@empty}
\renewcommand*\@begindvi{%
  \unvbox \@begindvibox
  \@originprint
  \global\let \@begindvi \@originprint}
\newcommand*{\@originprint}{%
  \setbox\@tempboxa\vbox to\z@{%
    \vskip-1in \moveleft1in = \vbox{%
      \hb@xt@\z@{%
        = \@originpic\hss}}\vss}
  \dp\@tempboxa\z@
  \box\@tempboxa \@pagelayout}
\endinput


\documentclass[a4paper, oneside]{letter}
\usepackage{bophook}
\PageLayout{%
  \newlength{\topdist}
  \setlength{\topdist}{\topmargin}
  \addtolength{\topdist}{\headheight}
  \newlength{\sidedist}
  \setlength{\sidedist}{\oddsidemargin}}
\newcommand*{\color}[1]{}
\AtBeginPage{%
  \unitlength1mm
  \begin{picture}(0,0)
    = \put(105,-22.5){\makebox(0,0){\Large Brief nach DIN 676 B--A4 = (1995--05)}}
    = \put(0,-45){\line(1,0){210}}
    = \put(20,-50){\line(1,0){85}}
    = \put(20,-90){\line(1,0){85}}
    = \put(20,-45){\line(0,-1){45}}
    = \put(105,-45){\line(0,-1){45}}
    = \put(0,-98.5){\line(1,0){210}}
    = \put(24,-98.5){\line(0,-1){173.1}}
    = \put(74.8,-98.5){\line(0,-1){20}}
    = \put(125.6,-98.5){\line(0,-1){20}}
    = \put(176.4,-98.5){\line(0,-1){20}}
    %%% Faltmarken
    = \put(0,-105){\line(1,0){10}}
    = \put(0,-210){\line(1,0){10}}
    %%% Lochermarke
    = \put(10,-148.5){\line(1,0){10}}
  \end{picture}}
  \newenvironment{brief}{%
    \ignorespacesafterend}{}
\begin{document}
\begin{brief}
  \makebox{}
\end{brief}
\end{document}

--
Karsten = Tinnefeld          &nbs= p;            = tinnefeld@ls2.cs.uni-dortmund.de
Fachbereich Informatik, Lehrstuhl = 2            =        T +49 231 755-4737
Universit=E4t Dortmund, D-44221 Dortmund, = Deutschland   F +49 231 755-2047

------_=_NextPart_001_01BF8816.39CC1F80--