From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/39465 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: newbie ConTeXt question Date: Tue, 11 Mar 2008 22:49:43 +0100 Message-ID: <20080311224943.2761dfd1.schuster.wolfgang@googlemail.com> References: <200803111652.42119.jazz_johnson@verizon.net> 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 1205272951 1394 80.91.229.12 (11 Mar 2008 22:02:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Mar 2008 22:02:31 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Tue Mar 11 23:02:49 2008 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 1JZCY6-0003TS-L2 for gctc-ntg-context-518@m.gmane.org; Tue, 11 Mar 2008 23:02:18 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E20361FCD0; Tue, 11 Mar 2008 23:01:41 +0100 (CET) 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 23991-03-6; Tue, 11 Mar 2008 23:01:06 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E0DA31FC98; Tue, 11 Mar 2008 23:01:05 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 488471FA41 for ; Tue, 11 Mar 2008 23:01:04 +0100 (CET) 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 24778-02-2 for ; Tue, 11 Mar 2008 23:00:29 +0100 (CET) Original-Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.153]) by ronja.ntg.nl (Postfix) with ESMTP id DB2191FC98 for ; Tue, 11 Mar 2008 23:00:29 +0100 (CET) Original-Received: by fg-out-1718.google.com with SMTP id e12so2186892fga.8 for ; Tue, 11 Mar 2008 15:00:29 -0700 (PDT) Original-Received: by 10.82.127.14 with SMTP id z14mr17681871buc.3.1205272829017; Tue, 11 Mar 2008 15:00:29 -0700 (PDT) Original-Received: from rover ( [91.41.87.160]) by mx.google.com with ESMTPS id c28sm17692727fka.0.2008.03.11.15.00.26 (version=SSLv3 cipher=OTHER); Tue, 11 Mar 2008 15:00:27 -0700 (PDT) In-Reply-To: <200803111652.42119.jazz_johnson@verizon.net> X-Mailer: Sylpheed 2.5.0beta1 (GTK+ 2.10.14; i686-pc-mingw32) 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:39465 Archived-At: On Tue, 11 Mar 2008 15:52:41 -0500 jazz_johnson@verizon.net wrote: > Hi: > > I'm trying to setup a simple (for now) letterhead like the following. > Is there a way to automatically adjust the horizontal spacing between > the \vbox{} \cbox{} \lbox{} > so that if I change the document margins, the center box is automatically > centered? > I've tried putting in \hfill's without luck. > > > \startenvironment > \setuppapersize[letter][letter] > \setuplayout[height=9in, > header=1.0in, > footer=0in, > topspace=1in, > backspace=1.33in, %the backspace includes the margin > location=middle,marking=on] > \setuppagenumbering [alternative=singlesided] > \noheaderandfooterlines > \setupbodyfont[cmr,12pt] > \usesymbols[mvs] \setupsymbolset[martinvogel 2] > > \def\MyLetterhead% > {%\showboxes > \vbox{%\showboxes > > \hbox{%\showboxes > \vbox{\hsize 3in > \tfa Your neighborhood\crlf > \scd{Company Store}} > \lbox{\hsize 3.0in \txx \setupinterlinespace \it Our Friendly Motto} > } \setupinterlinespace[line=.25ex] > > \hbox{ > \vbox{ \setupinterlinespace[height=.5,top=.5,line=.1ex] > \hsize 6.0in \thinrules[n=1, rulethickness=1.5pt] \crlf > \thinrules[n=1, rulethickness=0.7pt]} > } > > \hbox{ \tfx \setupinterlinespace[reset,medium] > \vbox{ \hsize 1.5in > \it www.mydomain.net\crlf > email@mydomain.net\crlf > contact@mydomain.net} > \cbox{ \hsize 2.3in > \symbol[star]~Va~\symbol[star]~Md~\symbol[star] \crlf > \symbol[Telephone] (555)123-4567 \crlf > \symbol[Faxmachine] (555)987-6543} > \lbox{ \hsize 2.0in > 1234 Main St.\crlf > P.O. Box 123\crlf > City, State 12345} > } > } > \setupinterlinespace[reset] > } > > \definelogo[Mylogo] [header] [left] [command=\MyLetterhead, state=stop] > > \stopenvironment Hi Jazz, \setuppapersize[letter][letter] \setuplayout [height=9in, header=1.0in, footer=0in, topspace=1in, backspace=1.33in, location=middle] \setuppagenumbering [alternative=singlesided] \noheaderandfooterlines \usesymbols[mvs] \setupsymbolset[martinvogel 2] \startsetups[letter:head] \vbox {\setupframed[frame=off,offset=none] \framed[width=\hsize,align=right,bottomframe=on,rulethickness=1.5pt] {{\tfa Your neighborhood}\\ {\scd Company Store}\hfill{\itxx\strut Our Friendly Motto}} \framed[width=\hsize,align=right,topframe=on,rulethickness=0.7pt] {\framed[width=fit,align=right] {\smallbodyfont\it\strut www.mydomain.net\\ email@mydomain.net\\ contact@mydomain.net\par} \hfill \framed[width=fit,align=middle] {\smallbodyfont\strut \symbol[star]~Va~\symbol[star]~Md~\symbol[star]\\ \symbol[Telephone]~(555)123-4567\\ \symbol[Faxmachine]~(555)987-6543\par} \hfill \framed[width=fit,align=left] {\smallbodyfont\strut1234 Main St.\\ P.O. Box 123\\ City, State 12345\par}}} \stopsetups \definelayer [header] [width=\paperwidth,height=\paperheight] \setlayerframed [header] [hoffset=\backspace,voffset=.5\headerheight,frame=off,width= \textwidth] {\setups{letter:head}} \setupbackgrounds[page][background=header] \starttext \input knuth \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 ___________________________________________________________________________________