From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/40740 Path: news.gmane.org!not-for-mail From: "Wolfgang Schuster" Newsgroups: gmane.comp.tex.context Subject: Re: Tables in headers Date: Mon, 28 Apr 2008 14:14:44 +0200 Message-ID: <115224fb0804280514s7be9bd94le1de2c3cef1a03d@mail.gmail.com> References: <99c4e1a80804280329p43f34396jaaf8355ae66a56bf@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1209385002 14822 80.91.229.12 (28 Apr 2008 12:16:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Apr 2008 12:16:42 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Mon Apr 28 14:17:18 2008 connect(): Connection refused Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1JqSHz-0006j1-5y for gctc-ntg-context-518@m.gmane.org; Mon, 28 Apr 2008 14:16:59 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7D7B81FBCC; Mon, 28 Apr 2008 14:16:16 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 17139-01-2; Mon, 28 Apr 2008 14:15:29 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 513D41FB6D; Mon, 28 Apr 2008 14:15:29 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id BCC021FB6D for ; Mon, 28 Apr 2008 14:15:27 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 16954-01-2 for ; Mon, 28 Apr 2008 14:14:53 +0200 (CEST) Original-Received: from yw-out-1718.google.com (yw-out-1718.google.com [74.125.46.158]) by ronja.ntg.nl (Postfix) with ESMTP id 8EF911FB49 for ; Mon, 28 Apr 2008 14:14:51 +0200 (CEST) Original-Received: by yw-out-1718.google.com with SMTP id 5so509505ywm.74 for ; Mon, 28 Apr 2008 05:14:44 -0700 (PDT) Original-Received: by 10.150.228.2 with SMTP id a2mr3587445ybh.245.1209384884239; Mon, 28 Apr 2008 05:14:44 -0700 (PDT) Original-Received: by 10.151.113.9 with HTTP; Mon, 28 Apr 2008 05:14:44 -0700 (PDT) In-Reply-To: <99c4e1a80804280329p43f34396jaaf8355ae66a56bf@mail.gmail.com> Content-Disposition: inline X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:40740 Archived-At: Hi Stefan, > I'll try to illustrate using a monospaced font: > > +------+ Company Name > | | > | Logo | > | | > +------+ > > ------------------------------------------------+------------ > Type of document | Page > Report of something | 2 (10) > -----------------------------------+------------+------------ > Name of document | Issue | Date > My document name | 1 | 2008-04-22 > -----------------------------------+------------+------------ > Issuer (dept, name, email) | Appendix > dept, name, email | Appendix > ------------------------------------------------+------------ > > This is the full header. A reduced header is used on the rest of the pages > where the last row is excluded. > > (I am trying to convert a MS-Word template...) \setvariables [document] [type={Report of something}, name={My document name}, issue={1}, date=\currentdate, issue={dept, name, email}, appendices={Appendix}] \definelayer [head:table] [width=\paperwidth, height=\paperheight, state=start] \definelayer [head:picture] [width=\paperwidth, height=\paperheight, state=repeat] \startsetups head:table \setlayer [head:table] [hoffset=\backspace, voffset=5cm] {\ifnum\pagenumber=\plusone \setups{head:table:first}% \else \setups{head:table:next}% \fi} \stopsetups \startsetups head:table:first \bTABLE[textwidth=\textwidth,option=stretch,align=right] \bTR \bTD[nx=2] Type of document\\\getvariable{document}{type} \eTD \bTD Page\\\pagenumber\space(\lastpagenumber) \eTD \eTR \bTR \bTD Name of document\\\getvariable{document}{name} \eTD \bTD Issue\\\getvariable{document}{issue} \eTD \bTD Date\\\getvariable{document}{date} \eTD \eTR \bTR \bTD[nx=2] Issuer (dept, name, email)\\\getvariable{document}{issue} \eTD \bTD Appendix\\\getvariable{document}{appendices} \eTD \eTR \eTABLE \stopsetups \startsetups head:table:next \bTABLE[textwidth=\textwidth,option=stretch,align=right] \bTR \bTD[nx=2] Type of document\\\getvariable{document}{type} \eTD \bTD Page\\\pagenumber\space(\lastpagenumber) \eTD \eTR \bTR \bTD Name of document\\\getvariable{document}{name} \eTD \bTD Issue\\\getvariable{document}{issue} \eTD \bTD Date\\\getvariable{document}{date} \eTD \eTR \eTABLE \stopsetups \setlayer [head:picture] [hoffset=\backspace, voffset=\topspace] {\externalfigure[Logo][width=3cm]} \setlayer [head:picture] [preset=righttop, hoffset=\cutspace, voffset=\topspace] {Company Name} \setupbackgrounds[page][setups={head:table},background={head:table,head:picture}] \starttext \dorecurse{3}{\page[empty]} \stoptext Greetings, Wolfgang ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________