Hi experts, I'm thinking about a new presentation style and need some general advice from the TeXperts. I would like to have a list of topics on some area of the slide (similar to s-pre-19.tex). However, if at all possible, I would like it to be a bit fancier. Let's say I want the list of topics typeset in gray frames in a black font, but the current topic in a blue frame with a white font. Would this be possible with something like \definelist? Is there any notion of "currentlistitem" or "currentmarking" in such lists? Or, even better: would it be possible to have access to the single members of a list and maybe compare them to a current value and then typeset them accordingly? Something like this pseudocode: for member in topiclist do if member == currentvalue <some fancy framing and metapost stuff with member> else <less fancy but still nice-looking metapost stuff> end end Or am I trying to reinvent the wheel here? I would be happy to hear any ideas on that. All best Thomas
Am 07.02.10 22:58, schrieb Thomas A. Schmitz:
Hi experts,
I'm thinking about a new presentation style and need some general advice from the TeXperts. I would like to have a list of topics on some area of the slide (similar to s-pre-19.tex). However, if at all possible, I would like it to be a bit fancier. Let's say I want the list of topics typeset in gray frames in a black font, but the current topic in a blue frame with a white font. Would this be possible with something like \definelist? Is there any notion of "currentlistitem" or "currentmarking" in such lists? Or, even better: would it be possible to have access to the single members of a list and maybe compare them to a current value and then typeset them accordingly? Something like this pseudocode:
for member in topiclist do if member == currentvalue <some fancy framing and metapost stuff with member> else <less fancy but still nice-looking metapost stuff> end end
Or am I trying to reinvent the wheel here? I would be happy to hear any ideas on that.
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
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
participants (2)
-
Thomas A. Schmitz
-
Wolfgang Schuster