From: reviczky@caesar.elte.hu
To: ntg-context@ntg.nl
Subject: Re: setuphead command changes?
Date: Sun, 09 Dec 2012 12:22:19 +0100 [thread overview]
Message-ID: <20121209122219.18804ainkvyar88b@webmail.caesar.elte.hu> (raw)
> Am 09.12.2012 um 02:35 schrieb reviczky@caesar.elte.hu:
>
> > Hi,
> >
> > The following minimal example works on live.contextgarden.net but
> with the latest beta the command parameter doesn't seem work (the
> "TEST" does not appear in the margin).
> >
> > \showframe
> > \starttext
> > \define[2]\cmd{\inmargin{TEST}}
> > \startsubject[title=Title,command=\cmd]
> > \input knuth
> > \stopsubject
> > \stoptext
> >
> > Can someone confirm this?
>
>
> You have to use “alternative=command” before you can
> apply a command:
>
> \define[2]\SubjectCommand
> {\inmargin{TEST}}
>
> \setuphead
> [subject]
> [alternative=command,
> command=\SubjectCommand]
>
> \showframe
>
> \starttext
> \startsubject[title=Title]
> \input knuth
> \stopsubject
> \stoptext
Thanks. I only apply commands for certain headings, so is there a way
to have that working within the startsubject or is it not inheriting
from setupheads?
\define[2]\SubjectCommand
{\inmargin{TEST}}
\showframe
\starttext
\startsubject[title=Intro]
\input knuth
\stopsubject
\startsubject[title=Title,alternative=command,command=\SubjectCommand]
\input knuth
\stopsubject
\stoptext
This still doesn't show me the margin-text, whereas your example is fine.
> When you want more control about the layout of your header use
> \defineheadalternative to create it:
>
> \defineheadalternative
> [Subject]
> [alternative=horizontal,
> renderingsetup=Subject]
>
> \startsetups[Subject]
> \headsetupspacing
> \inmargin{TEST}
> \stopsetups
>
> \setuphead
> [subject]
> [alternative=Subject,
> distance=0pt]
>
> \showframe
>
> \starttext
> \startsubject[title=Title]%
> \input knuth
> \stopsubject
> \stoptext
That is great, thanks!
Adam
___________________________________________________________________________________
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
___________________________________________________________________________________
next reply other threads:[~2012-12-09 11:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-09 11:22 reviczky [this message]
2012-12-09 14:46 ` Wolfgang Schuster
2012-12-09 17:24 ` Wolfgang Schuster
-- strict thread matches above, loose matches on Subject: below --
2012-12-09 1:35 reviczky
2012-12-09 8:41 ` 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=20121209122219.18804ainkvyar88b@webmail.caesar.elte.hu \
--to=reviczky@caesar.elte.hu \
--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).