ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Two layer in a document
Date: Thu, 30 Sep 2010 19:42:34 +0200	[thread overview]
Message-ID: <EE387CBD-D350-48E5-A729-7398F485B028@gmail.com> (raw)
In-Reply-To: <C8CA29E0.210C%daniel.grycman@rub.de>


Am 30.09.2010 um 11:49 schrieb Daniel Grycman:

> Hi list,
> 
> I am typesetting a template for internal documentation. In the header of
> the document I want to put two different figure. One on the left side and
> the other on the right side. When I compile the source the output shows
> only the figure on the left side.
> 
> \enableregime[utf-8]
> \mainlanguage[de]
> \setupcolors [state=start]
> \setupoutput[pdftex]
> \setuppapersize[A4][A4]
> \usemodule [simplefonts,r,tikz,edtsnc,chart]
> \setmainfont [rubscalatz]
> \setsansfont [rubflama]
> \setuphead [chapter][number=no, style=bold, textcommand=\ss]
> \setuphead [section][number=no, style=bold, textcommand=\ss]
> \setuphead [subsection][number=no]
> \setuphead [subsubsection][number=no]
> \setuplayout
> [top=0cm,rightmargin=2.3cm,footer=1.0cm,header=5cm,topspace=0mm,height=29.9
> 577cm,width=16.25cm,leftmargindistance=0cm,rightmargindistance=0cm]
> 
> \setupbackgrounds[footer][background=color,backgroundcolor=gray]
> \setupbackgrounds[text][rightmargin][background=color,backgroundcolor=gray]
> \setupbackgrounds[header][rightmargin][background=color,backgroundcolor=gra
> y]

None of these settings is necessary for a minimal example, leave them out next time.

> \definelayer[logo][width=\paperwidth,height=\paperheight,state=repeat]
> \setupbackgrounds[page][righttop][background={foreground,logo}]
> \setlayer[logo][preset=righttop,hoffset=1cm,state=start]
> {\externalfigure[label][height=4cm,3.5cm]}
> \definelayer[marke][width=6.5cm,height=0.3cm,state=repeat]
> \setupbackgrounds[page][lefttop][background={foreground,marke}]
> \setlayer[marke][preset=lefttop,hoffset=1.3cm,voffset=1.4cm,state=repeat]
> {\externalfigure[wortmarke][height=0.3cm,width=6.5cm]}

One layer is enough for both pictures, try also to make it more readable next time.

\definelayer[logo][width=\paperwidth,height=\paperheight,state=repeat]

\setupbackgrounds[page][background={foreground,logo}]

\setlayer
	[logo]
	[preset=righttop,
	 hoffset=1cm]
	{\externalfigure[label][height=4cm,3.5cm]}

\setlayer
	[logo]
	[preset=lefttop,
	 hoffset=1.3cm,
	 voffset=1.4cm]
	{\externalfigure[wortmarke][height=0.3cm,width=6.5cm]}

\starttext
\dorecurse{20}{\input knuth\par}
\stoptext

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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  parent reply	other threads:[~2010-09-30 17:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-30  9:49 Daniel Grycman
2010-09-30 12:26 ` R. Bastian
2010-09-30 13:16   ` Daniel Grycman
2010-09-30 17:42 ` Wolfgang Schuster [this message]
2010-10-01  7:51   ` R. Bastian
2010-10-01  8:02     ` Daniel Grycman
2010-10-01  9:00     ` Peter Rolf
2010-10-01 10:08       ` Steffen Wolfrum
2010-10-01 10:44         ` Peter Rolf
2010-10-01 12:54       ` luigi scarso
2010-10-01 16:19       ` Aditya Mahajan

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=EE387CBD-D350-48E5-A729-7398F485B028@gmail.com \
    --to=schuster.wolfgang@googlemail.com \
    --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).