ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Problem with \setuplayout parameters being ignored
@ 2023-03-05 16:54 Keith McKay via ntg-context
  2023-03-05 16:58 ` Wolfgang Schuster via ntg-context
  0 siblings, 1 reply; 5+ messages in thread
From: Keith McKay via ntg-context @ 2023-03-05 16:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Keith McKay


[-- Attachment #1.1: Type: text/plain, Size: 1633 bytes --]

Hi

I'm having a strange problem with the \setuplayout command with the 
parameters being ignored. In the code below the only parameter which 
does get setup is the backspace parameter, the header, footer, width, 
and margin parameters are setup differently according to the log. I'm 
probably missing something fairly obvious so hints would be helpful. The 
document I'm trying to setup will probably be a maximum of 50 pages and 
I would like to reduce the space at the top and bottom of the page.

Best Wishes

Keith McKay

%%%%%%%%% Code so far %%%%%%%%%%%

\setuppapersize[A4]

\setuplayout[

backspace = 2.5cm,

margin = 0.5cm,

width = 16cm,

header = 1cm,

footer = 1cm,

]

\setupbackgrounds[state=repeat]

\defineoverlay[apage][

{\startMPcode

StartPage;

definecolor[ name = "MyColor1", r = uniformdeviate(1), g = 
uniformdeviate(1), b = uniformdeviate(1) ] ;

definecolor[ name = "MyColor2", r = uniformdeviate(1), g = 
uniformdeviate(1), b = uniformdeviate(1) ] ;

draw lmt_shade [

path = Page,

direction = "down",

alternative = "linear",

colors = { "MyColor2", "MyColor1" },

] ;

draw lmt_shade [

path = Field[Text][Text],

direction = "down",

alternative = "linear",

colors = { "MyColor1", "MyColor2" },

] ;

StopPage;

\stopMPcode}

]

\showframe

\setupbackgrounds[page][background=apage]

\setupbackgrounds[footer][text] [background=color, backgroundcolor=blue]

\setupbackgrounds[header][text] [background=color, backgroundcolor=red]

\setuppagenumbering[state=start,alternative=doublesided,location=footer]

\showlayout

\starttext

\showsetups

\dorecurse{10}{

Page \recurselevel

\page

}

\stoptext

[-- Attachment #1.2: Type: text/html, Size: 7290 bytes --]

[-- Attachment #2: Type: text/plain, Size: 496 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-03-05 17:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-05 16:54 Problem with \setuplayout parameters being ignored Keith McKay via ntg-context
2023-03-05 16:58 ` Wolfgang Schuster via ntg-context
2023-03-05 17:10   ` Keith McKay via ntg-context
2023-03-05 17:24     ` Wolfgang Schuster via ntg-context
2023-03-05 17:41       ` Keith McKay via ntg-context

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).