From: "Thomas A. Schmitz" <thomas.schmitz@uni-bonn.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: DIY toc (or similar list)
Date: Sun, 7 Feb 2010 23:55:54 +0100 [thread overview]
Message-ID: <29E45C2A-A970-4BBB-BEAF-E26CF7AC5F44@uni-bonn.de> (raw)
In-Reply-To: <4B6F3BC9.1070404@googlemail.com>
On Feb 7, 2010, at 11:16 PM, Wolfgang Schuster wrote:
> you can do something like this (not sure if it works):
>
> \setuplist[...][alternative=command,command=\MyFancyListentry]
>
> \define[3]\MyFancyListentry
> {\doifelse{#2}{\fullstructureheadtitle} % is this the correct value?
> {...}% fancy layout
> {...}% normal layout
> ...}
>
> Wolfgang
Wolfgang, thanks a lot! I could adapt your code so it does what I want! Here's what I have now, I'm sure I can run with that for the presentation stuff. Thanks a lot, and best wishes!
Thomas
\definelist[MyTopics][criterium=all]
\define[3]\FancyEntry
{\doifelse{#1}{\MyMark} %
{\color[blue]{#1}}% fancy layout
{\color[red]{#1}}% normal layout
\par}
\setuplist[MyTopics]
[style=\tfxx,
pagenumber=no,
alternative=command,
command=\FancyEntry]
\def\Topic#1{%
\def\MyMark{#1}%
\writetolist[MyTopics]{#1}{}%
\completelist[MyTopics]%
}
\starttext
\Topic{First}
Hello 1
\page
\Topic{Second}
Hello 2
\page
\Topic{Third}
Hello 3
\page
\Topic{Fourth}
Hello 4
\stoptext
___________________________________________________________________________________
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 prev parent reply other threads:[~2010-02-07 22:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-07 21:58 Thomas A. Schmitz
2010-02-07 22:16 ` Wolfgang Schuster
2010-02-07 22:55 ` Thomas A. Schmitz [this message]
2010-02-07 23:12 ` 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=29E45C2A-A970-4BBB-BEAF-E26CF7AC5F44@uni-bonn.de \
--to=thomas.schmitz@uni-bonn.de \
--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).