From: Thomas Moore <tmoore@pomona.edu>
Subject: Re: Newbie questions
Date: Wed, 28 Jun 2006 17:33:23 -0700 [thread overview]
Message-ID: <F6015F18-BA03-4DF9-A784-D468BD026871@pomona.edu> (raw)
In-Reply-To: <E2137EC2-4ACC-4928-BAF4-FBFC3B5AFC2E@pomona.edu>
Dear ConTeXt gurus:
OK, I have gotten some off-list help from Mojca, who has answered
most of my questions and helped me polish the two page version of my
code (thanks, Mojca!). I have included what he helped me work out
below. There is one remaining problem. The first page is correct, but
very subsequent page has a correct-looking header and another
superimposed. The second superimposed header is not wide enough and
has the wrong page number (the number of the previous page), though
the page number is on the correct side. It is as if the page output
command from TeX is issuing the \setups command *twice*, once before
fully updating variables like \rightmarginwidth and the page number,
and once after setups have been done correctly. Is this a bug, or am
I doing something stupid?
Thanks for any insight, Tom
Code follows:
\usemodule[amsl]
\usemodule[newmat]
\setuppapersize[letter]
\setuppagenumbering
[alternative=doublesided]
\setuplayout
[backspace=1.0in,
topspace=0.5in,
width=4.5in,
height=9.5in,
rightmargin=2.35in,
rightmargindistance=0.15in,
leftmargin=0in,
leftmargindistance=0in,
header=0.5 in,
footer=0in]
\definelayer
[leftpage]
[hoffset=\the\dimexpr\cutspace-\leftmarginwidth-\leftmargindistance
\relax, % for left pages
voffset=\topspace,
width=\paperwidth,
height=\paperheight]
\definelayer
[rightpage]
[hoffset=\the\dimexpr\backspace\relax, % for right pages
voffset=\topspace,
width=\paperwidth,
height=\paperheight]
\setupbackgrounds
[leftpage]
[background=leftpage]
\setupbackgrounds
[rightpage]
[background=rightpage]
\startsetups page:setup
\setlayerframed
[leftpage]
[preset=lefttop]
[width=\dimexpr\textwidth+\leftmarginwidth+\leftmargindistance
\relax, % for left pages
rulethickness=1pt,
frame=off,
bottomframe=on]
{\pagenumber\hfill\getmarking[chapter][first]} % for left pages
\setlayerframed
[rightpage]
[preset=lefttop]
[width=\dimexpr\textwidth+\rightmarginwidth+\rightmargindistance
\relax, % for right pages
rulethickness=1pt,
frame=off,
bottomframe=on]
{\getmarking[chapter][first]\hfill\pagenumber} % for right pages
\stopsetups
\setupheadertexts
[\setups{page:setup}]
\starttext
\chapter{Test}
This is a test of some math stuff. $0 = g_{\mu\nu}dx^\nu dx^\nu$.
\dorecurse{10}{\input knuth}
\showlayout
\stoptext
next prev parent reply other threads:[~2006-06-29 0:33 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-24 14:56 Thomas Moore
2006-06-24 15:46 ` Sanjoy Mahajan
2006-06-24 16:45 ` Thomas Moore
2006-06-25 16:31 ` Hans Hagen
2006-06-29 15:02 ` Thomas Moore
2006-06-24 15:57 ` Mojca Miklavec
2006-06-24 16:52 ` Thomas Moore
2006-06-24 20:57 ` Sanjoy Mahajan
2006-06-24 17:15 ` Aditya Mahajan
2006-06-25 15:33 ` Mojca Miklavec
2006-06-25 16:54 ` Hans Hagen
2006-06-28 18:36 ` Thomas Moore
2006-06-29 0:33 ` Thomas Moore [this message]
2006-06-29 1:12 ` Aditya Mahajan
2006-06-29 2:35 ` Sanjoy Mahajan
2006-06-29 15:05 ` Thomas Moore
2006-06-29 14:57 ` Thomas Moore
2006-06-27 19:53 ` Gerben Wierda
2006-06-27 20:14 ` Hans Hagen
2006-06-28 18:42 ` Thomas Moore
2011-05-31 15:38 newbie questions Sanja C.
2011-05-31 16:27 ` Marco
2011-05-31 22:07 ` Pontus Lurcock
2011-05-31 23:44 ` George N. White III
2014-05-15 13:40 Joan & Gary
2014-05-16 8:03 ` 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=F6015F18-BA03-4DF9-A784-D468BD026871@pomona.edu \
--to=tmoore@pomona.edu \
--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).