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: Understanding ConTeXt better. What does \doattributes do?
Date: Mon, 4 Aug 2008 11:37:38 +0200	[thread overview]
Message-ID: <115224fb0808040237t7bb78be4n418f88513dbd048@mail.gmail.com> (raw)
In-Reply-To: <e65d34bf0808030229w62a69c4et1b99523dc1d1e111@mail.gmail.com>

On Sun, Aug 3, 2008 at 11:29 AM, Elliot Clifton <cliftoo@gmail.com> wrote:
> Hi,
>
> I've been reading the Document Titles page on the wiki
> <http://wiki.contextgarden.net/Document_Titles>. I'm trying to better
> understand how ConTeXt works. Could someone explain what
> \doattributes does? It doesn't appear to be covered in the Inside
> ConTeXt section of the wiki.

\setupcolors[state=start]

\starttext

% \my..  : namespace
% ..style: you could use any value defined with \definecolor
% ..color: one of ConTeXt's font/style switching command like \bf, \ss, \tfa ...

\def\mycolor{red}
\def\mystyle{bold}

\doattributes{my}{style}{color}{Red bold text.}

\def\mycolor{green}
\def\mystyle{\ss\tfb}

\doattributes{my}{style}{color}{Green big text.}

\stoptext

> Also on the subject of Document Titles. Why is it that \setuptitle is
> called several times at the end of the source code?

The \setuptitle command is used to set the color and style for the
elements and the version with one argument is used to set the text.

\setuptitle
  [\c!title]
  [\c!style=\tfd,
   \c!color=]

Print the 'document title' in a bigger size.

\setuptitle
  [\c!author,\c!date]
  [\c!style=\tfa,
   \c!color=]

Print the 'author name' and the 'date' in a slightly bigger size.

\setuptitle
  [\c!title=,
   \c!author=,
   \c!date=\currentdate]

No content for the 'author' and the 'document title' by default but set
the value 'date' to the current day.

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


  reply	other threads:[~2008-08-04  9:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-03  9:29 Elliot Clifton
2008-08-04  9:37 ` Wolfgang Schuster [this message]
2008-08-04  9:39   ` Wolfgang Schuster

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=115224fb0808040237t7bb78be4n418f88513dbd048@mail.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).