ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Working with layers ... with example
Date: Tue, 25 Jun 2013 04:57:06 +0200	[thread overview]
Message-ID: <CDB5E5F1-7F00-421C-B39C-FD0BB364BE20@gmail.com> (raw)
In-Reply-To: <51C8D504.1030107@student.ru.nl>


Am 25.06.2013 um 01:23 schrieb Sander Maijers <S.N.Maijers@student.ru.nl>:

> At http://ideone.com/D6Mmj3 there is the title page for my document. I want to place the table in the middle of the A4 page (horizontally and vertically) and the logo beneath it, preferably at the bottom of the page.
> 
> When I failed to get the table placed where I want it, at some point, I tried to use a layer. In the end the table was placed okay, but in a messy way I suppose.
> 
> Now I have tried to add another layer but the logo appears to the right of the table or not at all. As far as I understand there can only be one background layer, so that trick with the table will not work again for the logo I guess.
> 
> Can someone please help me to use multiple layers that I can exactly position?

1. When you have multiple layers you have to to list them all in the \setupbackgrounds commands.

   \setupbackgrounds[page][background={document_logo,document_data}]

2. You can insert a certain numbers of empty lines in your document with \blank[<n>*line].

3. \startalignment makes no sense in a layer.

4. You can align single lines of text with \leftaligned, \midaligned or \rightaligned.


\startcomponent title_page

\product bachelors_thesis_text
\project bachelors_thesis
 
\definelayer
  [document_data]
  [x=0mm, y=0mm, width=20cm, height=30cm]

\definelayer
  [document_logo]
  [x=0mm, y=0mm, width=20cm, height=30cm]
 
\setupbackgrounds[page][background={document_logo,document_data}]
 
\setlayer
  [document_data]
  [hoffset=4cm, voffset=15cm]
  {\bTABLE[align=middle]
     \bTR 
       \bTD institution \eTD 
       \bTD[align=middle] \eTD 
     \eTR
     \bTR 
       \bTD in fulfillment of \eTD 
       \bTD[align=middle] \eTD
     \eTR                    
     \bTR 
       \bTD supervisors \eTD 
       \bTD[align=middle] \eTD 
     \eTR
     \bTR 
       \bTD revision date \eTD 
       \bTD[align=middle] \currentdate[weekday,month,day,{, },year] \eTD 
     \eTR
     \bTR 
       \bTD author e-mail \eTD 
       \bTD[align=middle]  \eTD 
     \eTR
     \bTR 
       \bTD further info \eTD 
       \bTD[align=middle]  \eTD
     \eTR
   \eTABLE}
 
\setlayer
  [document_logo]
  [hoffset=4cm, voffset=10cm]
  {\externalfigure[alogo.eps][factor=fit]}
 
\setupinteraction[state=start] 

\starttext

{\tfd Title}

\blank[3*line]        

\rightaligned{\tfa\it Sander Maijers}           

\stoptext

\stopcomponent


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
___________________________________________________________________________________


      reply	other threads:[~2013-06-25  2:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-24 23:23 Sander Maijers
2013-06-25  2:57 ` Wolfgang Schuster [this message]

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=CDB5E5F1-7F00-421C-B39C-FD0BB364BE20@gmail.com \
    --to=schuster.wolfgang@gmail.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).