From: Thomas Moore <tmoore@pomona.edu>
Subject: Re: Newbie questions
Date: Wed, 28 Jun 2006 11:36:39 -0700 [thread overview]
Message-ID: <E2137EC2-4ACC-4928-BAF4-FBFC3B5AFC2E@pomona.edu> (raw)
In-Reply-To: <449EBFB5.2070100@wxs.nl>
On Jun 25, 2006, at 9:54 AM, Hans Hagen wrote:
> Mojca Miklavec wrote:
>>
>> ....Hoping that someone can fix at least one of the solutions
>> above to
>> work as intended,
>>
>
> ok, here is a trick: ....
> now, the left right page problem is up to you ... keep in mind that
> we have
>
> \setupbackgrounds
> [leftpage]
> [...]
>
> \setupbackgrounds
> [rightpage]
> [...]
Thanks, Mojca, for your ideas! Special thanks to Hans, whose solution
seemed efficient and worked like a charm (after I made one minor
fix). I have attached to the end of this message code that works well
on *either* right pages *or* left pages. Now I'd like to extend the
code so that it would work on *both* kinds of pages. But my
experimentation has raised the following questions:
1. When I change the \setupbackgrounds [page][background=thepage] in
the code shown below to \setupbackgrounds [rightpage]
[background=thepage], I expected that the left page would have no
header and the right page would have the appropriate header. However,
when I do this, I get two superimposed headers with different lengths
on right pages (and nothing, as expected, on left pages). Why do I
get *two* headers on the right page?
2. I also do not understand \startsetups command, which I could not
find in the ConTexT manual or in the online summary of ConTexT
commands. It looks like the purpose of this command is to put a
wrapper around the \setlayerframed command so that it can be used in
the \setupheadertexts command. Is this right? Also:
a. I guess that I don't understand why the \setlayerframed
command could not be used directly in the \setupheadertexts command:
why do we need the wrapper?
b. And why this particular wrapping command? (\startfoo ...
\stopfoo doesn't work.)
c. Also, I am assuming that the colon is simply part of the name
assigned to this setup and has no other significance: is this right?
3. So, my guess (once problem 1 is fixed), is that I will define
*two* layers (one for right pages and one for left pages), and do a
\setupbackground [rightpage][background=therightpage] and a
\setupbackground[leftpage][background=theleftpage]. But I don't know
what to do inside the \startsetup ... \stopsetup. Do I have a pair of
\setlayerframed statements? Do I surround this pair with something
like an if onRightPage ... if onLeftPage statement? Or do I put the
if-then statements *inside* the \setlayerframed statement?
Thanks for any help...
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
[thepage]
%[hoffset=\the\dimexpr\cutspace-\leftmarginwidth-
\leftmargindistance\relax, % for left pages
[hoffset=\the\dimexpr\backspace\relax, % for right pages
voffset=\topspace,
width=\paperwidth,
height=\paperheight]
\setupbackgrounds
[page]
[background=thepage]
\startsetups page:setup
\setlayerframed
[thepage]
[preset=lefttop]
% [width=\dimexpr\textwidth+\leftmarginwidth+\leftmargindistance
\relax, % for left pages
[width=\dimexpr\textwidth+\rightmarginwidth+\rightmargindistance
\relax, % for right pages
rulethickness=1pt,
frame=off,
bottomframe=on]
% {\pagenumber\hfill\getmarking[chapter][first]} % for left pages
{\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-28 18:36 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 [this message]
2006-06-29 0:33 ` Thomas Moore
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=E2137EC2-4ACC-4928-BAF4-FBFC3B5AFC2E@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).