ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Idris Samawi Hamid <ishamid@colostate.edu>
Subject: Re: defining commands
Date: Fri, 05 Feb 2010 18:53:04 +0100	[thread overview]
Message-ID: <4B6C5B00.9000408@wxs.nl> (raw)
In-Reply-To: <4B6BE515.8060903@googlemail.com>

On 5-2-2010 10:29, Wolfgang Schuster wrote:
> Am 05.02.10 09:03, schrieb Marius:
>> Hello all,
>>
>> How do I define the \setuptitlepage and \placetitlepage commands in the
>> environment file? These commands are used as shown in the example below.
>
> Since you do not explain what do you expect from both commands it's not
> possible to give you an answer but you can find on the wiki [1] a
> example for a \setuptitle and \placetitle command which can be copied
> and used in your document.
>
> [1]
> http://wiki.contextgarden.net/Document_Titles#In_ConTeXt:_A_more_advanced_solution

using no macros ... wikifyable ...

\startsetups titlepage
     \startstandardmakeup
         \definedfont[SerifBold at 40pt]
         \setupinterlinespace
         \getvariable{document}{title}
         \vfill
         \definedfont[SerifBold at 20pt]
         \setupinterlinespace
         \getvariable{document}{author}
     \stopstandardmakeup
\stopsetups

\setvariables
     [document]
     [title=Whatever,
      author=Not Me]

\setvariables
     [whatever]
     [set={\setup[whateverpage]}]

\startsetups whateverpage
     \startstandardmakeup
         \definedfont[SerifBold at 40pt]
         \setupinterlinespace
         \getvariable{whatever}{title}
         \vfill
     \stopstandardmakeup
\stopsetups

\starttext
     \setups[titlepage]
     \setvariables[whatever][title=One]
     \setvariables[whatever][title=Two]
\stoptext

in the whatever case each setvariables will trigger a setup, so one has 
a sort of macro with key/value support


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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-02-05 17:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-05  8:03 Marius
2010-02-05  9:29 ` Wolfgang Schuster
2010-02-05 13:57   ` Marius
2010-02-05 17:36     ` Hans Hagen
2010-02-05 17:53   ` Hans Hagen [this message]
2010-02-05 18:08     ` Wolfgang Schuster
2010-02-05 18:19       ` Hans Hagen
2010-02-05 18:21         ` Wolfgang Schuster
2010-02-05 18:29           ` Hans Hagen
     [not found] <mailman.170.1265412781.26807.ntg-context@ntg.nl>
2010-02-06 15:29 ` Wolfgang Werners-Lucchini

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=4B6C5B00.9000408@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=ishamid@colostate.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).