From: jazz_johnson@verizon.net
To: ntg-context@ntg.nl
Subject: newbie ConTeXt question
Date: Tue, 11 Mar 2008 15:52:41 -0500 [thread overview]
Message-ID: <200803111652.42119.jazz_johnson@verizon.net> (raw)
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
___________________________________________________________________________________
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
___________________________________________________________________________________
next reply other threads:[~2008-03-11 20:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-11 20:52 jazz_johnson [this message]
2008-03-11 21:49 ` Wolfgang Schuster
2008-03-12 1:42 ` jazz_johnson
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=200803111652.42119.jazz_johnson@verizon.net \
--to=jazz_johnson@verizon.net \
--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).