* [NTG-context] expansion of section title
@ 2023-06-27 18:55 Henning Hraban Ramm via ntg-context
2023-06-27 19:01 ` Wolfgang Schuster via ntg-context
0 siblings, 1 reply; 3+ messages in thread
From: Henning Hraban Ramm via ntg-context @ 2023-06-27 18:55 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Henning Hraban Ramm
I think I had a good idea how to keep an overview of the “todos” in my
book project:
\defineregister[todos]
% add a "todos" index entry with the current section title
\define[1]\TODO{\todos{\structurevariable{title}}}
\chapter{Something}
\TODO{This is still empty!}
% at the end of the book
\chapter{work list}
\placetodos
But the section title is always "work list" in the "todos" index.
I guess I need some expansion and tried \expanded, \safeexpanded,
\expandoneargafter, \fullexpandoneargafter, but probably not in the
right place.
How does this work?
Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [NTG-context] expansion of section title
2023-06-27 18:55 [NTG-context] expansion of section title Henning Hraban Ramm via ntg-context
@ 2023-06-27 19:01 ` Wolfgang Schuster via ntg-context
2023-06-27 19:19 ` Henning Hraban Ramm via ntg-context
0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster via ntg-context @ 2023-06-27 19:01 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Wolfgang Schuster
Henning Hraban Ramm via ntg-context schrieb am 27.06.2023 um 20:55:
> \defineregister[todos]
>
> % add a "todos" index entry with the current section title
> \define[1]\TODO{\todos{\structurevariable{title}}}
>
> \chapter{Something}
> \TODO{This is still empty!}
>
> % at the end of the book
> \chapter{work list}
> \placetodos
\define[1]\TODO{\expanded{\todos{\structurevariable{title}}}}
What is the purpose of the argument for \TODO when you don't use it?
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [NTG-context] expansion of section title
2023-06-27 19:01 ` Wolfgang Schuster via ntg-context
@ 2023-06-27 19:19 ` Henning Hraban Ramm via ntg-context
0 siblings, 0 replies; 3+ messages in thread
From: Henning Hraban Ramm via ntg-context @ 2023-06-27 19:19 UTC (permalink / raw)
To: Wolfgang Schuster via ntg-context; +Cc: Henning Hraban Ramm
Am 27.06.23 um 21:01 schrieb Wolfgang Schuster via ntg-context:
> Henning Hraban Ramm via ntg-context schrieb am 27.06.2023 um 20:55:
>> \defineregister[todos]
>>
>> % add a "todos" index entry with the current section title
>> \define[1]\TODO{\todos{\structurevariable{title}}}
>>
>> \chapter{Something}
>> \TODO{This is still empty!}
>>
>> % at the end of the book
>> \chapter{work list}
>> \placetodos
>
> \define[1]\TODO{\expanded{\todos{\structurevariable{title}}}}
Thank you, that works.
I thought I tried that, but probably forgot the braces.
> What is the purpose of the argument for \TODO when you don't use it?
I simplified too much, the actual definition is (now):
\define[1]\TODO{\inouter{\tt\color[ColTodo]{TODO}}\expanded{\todos{\structurevariable{title}}}\color[ColTodo]{\bf
#1}\autoinsertnextspace}
Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-06-27 19:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-27 18:55 [NTG-context] expansion of section title Henning Hraban Ramm via ntg-context
2023-06-27 19:01 ` Wolfgang Schuster via ntg-context
2023-06-27 19:19 ` Henning Hraban Ramm via ntg-context
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).