ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Marco Kuhlmann <marco.kuhlmann@gmx.net>
Subject: Namespacing and pagestyles
Date: Sun, 9 Dec 2001 21:17:13 +0000	[thread overview]
Message-ID: <20011209211713.GA3148@localhost> (raw)

[-- Attachment #1: Type: text/plain, Size: 758 bytes --]

    Hi ya,

I am currently devising a letter style and am experiencing two
problems which I do not have an answer for. Perhaps you have?

1. The attached dinbrief.tex compiles fine, except that it does
   not produce the field for the address. However, it does when
   you change dinbrief@address to, say, dinbrief@qaddress, and
   the address parameter to qaddress in the setup. Why?

2. My letter style should have two different kinds of page
   styles: one for the first page, and another one for all of
   the following. How do I achieve this in clean ConTeXt? How
   is it done for the sectioning commands (like chapter)?

Any hints would be appreciated.

    Cheers,
    Marco    

-- 
Marco Kuhlmann                             marco.kuhlmann@gmx.net

[-- Attachment #2: dinbrief.tex --]
[-- Type: text/x-tex, Size: 2683 bytes --]

\unprotect

\setuppapersize
  [A4] [A4]

\setuplayout
  [topspace=110mm,
   backspace=24mm,
   bottomspace=22mm,
   width=162mm,
   header=0mm,
   footer=0mm]

\def\setupletter{%
  \dosingleargument\dosetupletter}

\def\dosetupletter[#1]{%
  \getparameters[dinbrief@][#1]}

\def\DummyLetterHead{%
  \position(20mm,20mm){%
    \framed[width=170mm,height=20mm]{letter head}}}

\def\DummyBackAddress{%
  \position(0mm,0mm){%
    \framed[width=85mm,height=5mm]{back address}}}

\def\DummyAddress{%
  \position(0mm,2mm){%
    \framed[width=85mm,height=38mm]{address}}}

\def\DummyInfo{%
  \position(20mm,2mm){%
    \framed[width=65mm,height=53mm]{information}}}

\def\DummyLetterFoot{%
  \position(20mm,0mm){%
    \framed[width=170mm,height=7mm]{letter foot}}}

\setupletter
  [foldmarks=on,
   letterhead=\DummyLetterHead,
   backaddress=\DummyBackAddress,
   address=\DummyAddress,
   info=\DummyInfo,
   letterfoot=\DummyLetterFoot]

\definelayer
  [dinbrief@layer@letterhead]

\setlayer
  [dinbrief@layer@letterhead]
  [x=0mm,y=0mm,width=210mm,height=45mm]
  {\getvalue{dinbrief@letterhead}}

\definelayer
  [dinbrief@layer@foldmarkA]

\setlayer
  [dinbrief@layer@foldmarkA]
  [x=7.5mm,y=104.5mm,width=2.5mm,height=1mm]
  {\framed[width=2.5mm,height=1mm,frame=off]{%
      \doifvalue{dinbrief@foldmarks}{on}{\hairline}}}

\definelayer
  [dinbrief@layer@punchmark]

\setlayer
  [dinbrief@layer@punchmark]
  [x=5.0mm,y=148.0mm,width=5mm,height=1mm]
  {\framed[width=5mm,height=1mm,frame=off]{%
      \doifvalue{dinbrief@foldmarks}{on}{\hairline}}}

\definelayer
  [dinbrief@layer@foldmarkB]

\setlayer
  [dinbrief@layer@foldmarkB]
  [x=7.5mm,y=191.5mm,width=2.5mm,height=1mm]
  {\framed[width=2.5mm,height=1mm,frame=off]{%
      \doifvalue{dinbrief@foldmarks}{on}{\hairline}}}

\definelayer
  [dinbrief@layer@backaddress]

\setlayer
  [dinbrief@layer@backaddress]
  [x=20mm,y=45mm,width=85mm,height=5mm]
  {\getvalue{dinbrief@backaddress}}

\definelayer
  [dinbrief@layer@address]

\setlayer
  [dinbrief@layer@address]
  [x=20mm,y=50mm,width=85mm,height=40mm]
  {\getvalue{dinbrief@address}}

\definelayer
  [dinbrief@layer@info]

\setlayer
  [dinbrief@layer@info]
  [x=105mm,y=50mm,width=105mm,height=55mm]
  {\getvalue{dinbrief@info}}

\definelayer
  [dinbrief@layer@letterfoot]

\setlayer
  [dinbrief@layer@letterfoot]
  [x=0mm,y=280mm,width=210mm,height=17mm]
  {\getvalue{dinbrief@letterfoot}}

\setupbackgrounds
  [page]
  [background={%
    dinbrief@layer@letterhead,dinbrief@layer@foldmarkA,%
    dinbrief@layer@punchmark,dinbrief@layer@foldmarkB,%
    dinbrief@layer@backaddress,dinbrief@layer@address,%
    dinbrief@layer@info,dinbrief@layer@letterfoot}]

\protect

\endinput

             reply	other threads:[~2001-12-09 21:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-09 21:17 Marco Kuhlmann [this message]
     [not found] ` <5.1.0.14.1.20011210110508.030703d8@server-1>
2001-12-10 11:44   ` Marco Kuhlmann
2001-12-11 22:57     ` 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=20011209211713.GA3148@localhost \
    --to=marco.kuhlmann@gmx.net \
    /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).