ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Working with layers ... with example
@ 2013-06-24 23:23 Sander Maijers
  2013-06-25  2:57 ` Wolfgang Schuster
  0 siblings, 1 reply; 2+ messages in thread
From: Sander Maijers @ 2013-06-24 23:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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?
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: Working with layers ... with example
  2013-06-24 23:23 Working with layers ... with example Sander Maijers
@ 2013-06-25  2:57 ` Wolfgang Schuster
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Schuster @ 2013-06-25  2:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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
___________________________________________________________________________________


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

end of thread, other threads:[~2013-06-25  2:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-24 23:23 Working with layers ... with example Sander Maijers
2013-06-25  2:57 ` Wolfgang Schuster

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